-
-
Notifications
You must be signed in to change notification settings - Fork 23
36 lines (36 loc) · 1.04 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
36
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