Publish Static #387
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
name: Publish Static | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "0 2 * * 1-5" | |
jobs: | |
build-site: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: master | |
fetch-depth: 0 | |
- name: Create CNAME File | |
run: echo "system-design.milon.im" >> docs/CNAME | |
- name: Stage Files | |
run: git add -f docs | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git commit -m "Commit to deploy" | |
- name: Publish | |
run: | | |
git subtree split --prefix docs -b gh-pages | |
git push -f origin gh-pages:gh-pages | |
git branch -D gh-pages |