update readme for s2025 #9
This file contains hidden or 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-gh-pages | |
| on: | |
| push: | |
| branches: main | |
| jobs: | |
| gh-pages: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Create site | |
| run: | | |
| echo generate main html page in _site/ | |
| mkdir _site | |
| npm install marked | |
| cp .assets/template.html _site/index.html | |
| npx marked -i README.md >> _site/index.html | |
| cat .assets/template_end.html >> _site/index.html | |
| cp *.png _site/ | |
| cp *.svg _site/ | |
| cp *.jpg _site/ | |
| echo done generating index.html | |
| - name: Push to gh-pages | |
| run: | | |
| git clone --quiet --branch gh-pages --depth 1 https://github.com/${{ github.repository }}.git .gh-pages | |
| find .gh-pages -maxdepth 1 -type f -delete | |
| cp _site/* .gh-pages | |
| cd .gh-pages | |
| git add * | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| git commit --allow-empty -m "Update gh-pages for main/${{ github.sha }}" | |
| git push https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:gh-pages --force --follow-tags -v |