mirror of
https://github.com/D4M13N-D3V/godot_template.git
synced 2025-03-14 10:04:59 +00:00
workflow
This commit is contained in:
parent
c0ed4687e2
commit
985ab2ed61
49
.github/workflows/game_web_ci
vendored
Normal file
49
.github/workflows/game_web_ci
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
name: "Publish to GitHub Pages"
|
||||||
|
|
||||||
|
env:
|
||||||
|
GODOT_VERSION: 4.1.2
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: barichello/godot-ci:4.1.2
|
||||||
|
|
||||||
|
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 build/web
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: godot -v --export-release --headless "Web" ../build/web/index.html project/project.godot
|
||||||
|
|
||||||
|
- name: Add coi-service-worker
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/gzuidhof/coi-serviceworker.git
|
||||||
|
mv coi-serviceworker/coi-serviceworker.js build/web/coi-serviceworker.js
|
||||||
|
sed -i '3 i <script src="coi-serviceworker.js"></script>' build/web/index.html
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3.9.3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./build/web
|
||||||
|
force_orphan: true
|
||||||
|
user_name: "github-ci[bot]"
|
||||||
|
user_email: "github-actions[bot]@users.noreply.github.com"
|
||||||
|
commit_message: "UPDATE GITHUB PAGES"
|
@ -8,7 +8,7 @@ custom_features=""
|
|||||||
export_filter="all_resources"
|
export_filter="all_resources"
|
||||||
include_filter=""
|
include_filter=""
|
||||||
exclude_filter=""
|
exclude_filter=""
|
||||||
export_path="build/linux/game.html"
|
export_path="build/web/index.html"
|
||||||
encryption_include_filters=""
|
encryption_include_filters=""
|
||||||
encryption_exclude_filters=""
|
encryption_exclude_filters=""
|
||||||
encrypt_pck=false
|
encrypt_pck=false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user