oops #418
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: Update docs and demo | |
on: | |
push: | |
branches: | |
- '**' | |
paths-ignore: | |
- 'README.md' | |
- 'demo/snake.com' | |
- 'demo/qr.png' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
concurrency: | |
group: $GITHUB_WORKFLOW | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
sudo apt-get install qrencode nasm python3 -y > /dev/null | |
nasm snake.asm -o demo/snake.com | |
gcc -Os -w -xc - <<< "main;" | |
xxd -p demo/snake.com | python3 docs/update.py | |
qrencode -r demo/snake.com -8 -o demo/qr.png | |
git config --global user.email "$GITHUB_REPOSITORY_OWNER_ID+$GITHUB_REPOSITORY_OWNER@users.noreply.github.com" | |
git config --global user.name "$GITHUB_REPOSITORY_OWNER" | |
git commit -am "${GITHUB_WORKFLOW,,}" -q || true | |
git push -q | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'demo/' | |
- uses: actions/deploy-pages@v4 |