forked from raysan5/raylib-game-template
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.31 KB
/
build-wasm.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
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build and Publish WASM
on:
push:
branches: ["main"]
release:
types: [published]
workflow_dispatch:
env:
PLATFORM: PLATFORM_WEB
GITHUB_SHA: ${{ github.sha }}
REPO: ${{ github.repository }}
jobs:
make-gh-pages:
name: Create gh-pages branch if necessary
runs-on: ubuntu-latest
steps:
- name: Create gh-pages branch
uses: peterjgrainger/action-create-branch@v2.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: 'gh-pages'
build:
name: Build WASM for Merge
needs: [make-gh-pages]
runs-on: ubuntu-latest
steps:
-
name: Checkout raylib-game-template
uses: actions/checkout@v3
with:
path: raylib-game-template
-
name: Docker Build
run: ./raylib-game-template/docker-scripts/docker-build.sh
-
name: Docker Run
run: ./raylib-game-template/docker-scripts/docker-run.sh
-
name: Zip release artifacts
run: ./raylib-game-template/docker-scripts/zip-files.sh
-
name: Deploy Static Site
uses: moodiest/push-to-branch-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: raylib-game-template/dist
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}