-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (25 loc) · 851 Bytes
/
deploy.yml
File metadata and controls
31 lines (25 loc) · 851 Bytes
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
name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: latest
- name: Build WebAssembly
run: emcc src/main.cpp src/render/Renderer.cpp src/render/UI.cpp src/game/World.cpp src/game/Guest.cpp src/game/Pathfinder.cpp src/game/Track.cpp src/game/Train.cpp -Isrc -s USE_SDL=2 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -O3 -o index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
publish_branch: gh-pages
publish_files: index.html,index.js,index.wasm