-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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:[email protected]/$REPO.git | ||
git push origin main --force-with-lease | ||
git push origin site --force-with-lease | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ../ | ||
|
@@ -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 |