From 0897b8c5716e1b912d9fef0e48989132f4fdee40 Mon Sep 17 00:00:00 2001 From: omrilotan Date: Sat, 4 Dec 2021 00:15:33 +0000 Subject: [PATCH] build site branch --- .github/workflows/publish.yml | 12 ++++++------ package.json | 1 + scripts/manual-build.sh | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d0659b44..94c1ec4a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,18 +34,18 @@ jobs: - name: Test run: npm t - name: Clone docs and clean everything - if: github.ref == 'refs/heads/build' + if: github.ref == 'refs/heads/main' env: USERNAME: ${{ github.actor }} TOKEN: ${{ github.token }} REPO: ${{ github.repository }} run: | - git clone -b main --single-branch https://$USERNAME:$TOKEN@github.com/$REPO.git docs + git clone -b site --single-branch https://$USERNAME:$TOKEN@github.com/$REPO.git docs cd docs ls -a | grep -v .git | egrep -vU "\.$" | xargs rm -rf cd - - name: Install fonts - if: github.ref == 'refs/heads/build' + if: github.ref == 'refs/heads/main' run: | sudo mkdir /usr/share/fonts/opentype cd /usr/share/fonts @@ -56,10 +56,10 @@ jobs: sudo chmod -R --reference=/usr/share/fonts/opentype /usr/share/fonts/googlefonts sudo fc-cache -fv - name: Build - if: github.ref == 'refs/heads/build' + if: github.ref == 'refs/heads/main' run: npm run build - name: Check for changes and commit - if: github.ref == 'refs/heads/build' + if: github.ref == 'refs/heads/main' env: USERNAME: ${{ github.actor }} TOKEN: ${{ github.token }} @@ -74,5 +74,5 @@ jobs: git add . git commit -m "$(curl -s whatthecommit.com/index.txt)" git remote set-url origin https://$USERNAME:$TOKEN@github.com/$REPO.git - git push origin main --force-with-lease + git push origin site --force-with-lease fi diff --git a/package.json b/package.json index c834b4e3..bce09eb4 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "chai": "^4.2.0", "clear-module": "^4.1.1", "eslint": "^7.17.0", + "eslint-plugin-import": "^2.25.3", "eslint-plugin-log": "^1.2.7", "glob": "^7.1.6", "mime-types": "^2.1.28", diff --git a/scripts/manual-build.sh b/scripts/manual-build.sh index 6ec2606c..6174b721 100755 --- a/scripts/manual-build.sh +++ b/scripts/manual-build.sh @@ -1,5 +1,5 @@ rm -rf docs -git clone -b main --single-branch git@github.com:omrilotan/do.git docs +git clone -b site --single-branch git@github.com:omrilotan/do.git docs cd docs ls -a | grep -v .git | egrep -vU "\.$" | xargs rm -rf cd ../ @@ -8,4 +8,4 @@ cd docs # git checkout previews/* git add . git commit -m "$(curl -s whatthecommit.com/index.txt)" -git push origin main +git push origin site