-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (64 loc) · 2.36 KB
/
deploy.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: "Publish to GitHub Pages"
env:
GODOT_VERSION: 4.3
on:
workflow_dispatch:
push:
branches:
- main
jobs:
frontend:
name: Build Frontend and Deploy to Github Pages
runs-on: ubuntu-latest
permissions:
contents: write
container:
image: barichello/godot-ci:4.3
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Move HTML5 templates into position
run: |
mkdir -v -p ~/.local/share/godot/export_templates
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
- name: Create staging directory
run: mkdir -v -p frontend/build/web
- name: Build
run: godot -v --export-debug --headless "Web" ../frontend/build/web/index.html frontend/project/project.godot
- name: Add coi-service-worker
run: |
git clone https://github.com/gzuidhof/coi-serviceworker.git
mv coi-serviceworker/coi-serviceworker.js frontend/build/web/coi-serviceworker.js
sed -i '3 i <script src="coi-serviceworker.js"></script>' frontend/build/web/index.html
- name: Deploy
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./frontend/build/web
force_orphan: true
user_name: "github-ci[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
commit_message: "Publish to gh-pages"
backend:
name: Build Backend
runs-on: ubuntu-latest
permissions:
contents: write
container:
image: barichello/godot-ci:4.3
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Move Linux templates into position
run: |
mkdir -v -p ~/.local/share/godot/export_templates
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
- name: Create staging directory
run: mkdir -v -p backend/build/linux
- name: Build
run: godot -v --export-debug --headless "Linux" ../backend/build/linux/frogger_backend.x86_64 backend/project/project.godot
- name: Upload
uses: actions/upload-artifact@v4
with:
name: linux
path: backend/build/linux