Skip to content

Publish to GitHub Pages #1

Publish to GitHub Pages

Publish to GitHub Pages #1

Workflow file for this run

# Workflow to publish Godot HTML5 games to GitHub Pages
#
# Make sure your project is configured for Web export
# to the path `build/web`.
name: 'Publish to GitHub Pages'
env:
GODOT_VERSION: 4.2.1 # Remember to manually set image to this version below.
on:
workflow_dispatch:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-18.04
container:
image: barichello/godot-ci:4.2.1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Move HTML5 templates into position
run: |
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Create staging directory
run: mkdir -v -p build/web
- name: Build
run: godot -v --export "HTML5" build/web/index.html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
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: 'Publish to gh-pages'