-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1.25 KB
/
web-export.yml
File metadata and controls
43 lines (34 loc) · 1.25 KB
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
name: Build and Deploy Web Game
on:
push:
branches: [main]
jobs:
export-html5:
name: Export HTML5 and Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up build version
run: bash ${GITHUB_WORKSPACE}/generate_build_version.sh
- name: Setup Godot
uses: chickensoft-games/setup-godot@v2
with:
version: 4.4.1
use-dotnet: false
- name: Download and extract export templates
run: |
mkdir -p ~/.local/share/godot/export_templates/4.4.1.stable
wget https://github.com/godotengine/godot-builds/releases/download/4.4.1-stable/Godot_v4.4.1-stable_export_templates.tpz -O templates.tpz
unzip templates.tpz -d extracted_templates
cp extracted_templates/templates/web_*.zip ~/.local/share/godot/export_templates/4.4.1.stable/
- name: Export HTML5
run: |
mkdir build
godot --headless --export-release "Web" build/index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
publish_branch: gh-pages