Skip to content

Commit

Permalink
build site branch
Browse files Browse the repository at this point in the history
  • Loading branch information
omrilotan committed Dec 4, 2021
1 parent 038eb92 commit 0897b8c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]/$REPO.git docs
git clone -b site --single-branch https://$USERNAME:[email protected]/$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
Expand All @@ -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 }}
Expand All @@ -74,5 +74,5 @@ jobs:
git add .
git commit -m "$(curl -s whatthecommit.com/index.txt)"
git remote set-url origin https://$USERNAME:[email protected]/$REPO.git
git push origin main --force-with-lease
git push origin site --force-with-lease
fi
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions scripts/manual-build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rm -rf docs
git clone -b main --single-branch [email protected]:omrilotan/do.git docs
git clone -b site --single-branch [email protected]:omrilotan/do.git docs
cd docs
ls -a | grep -v .git | egrep -vU "\.$" | xargs rm -rf
cd ../
Expand All @@ -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

0 comments on commit 0897b8c

Please sign in to comment.