-
-
Notifications
You must be signed in to change notification settings - Fork 29
35 lines (35 loc) · 1.03 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Update docs and demo
on:
push:
paths-ignore:
- 'README.md'
- 'demo/snake.zip'
- '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 snake.com
gcc -Os -w -xc - <<< "main;"
xxd -p snake.com | python3 docs/update.py
qrencode -r snake.com -8 -o demo/qr.png
zip demo/snake.zip snake.com -q
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
git push -q
- uses: actions/upload-pages-artifact@v3
with:
path: 'demo/'
- uses: actions/deploy-pages@v4