Skip to content

godot-ci export

godot-ci export #9

Workflow file for this run

name: "godot-ci export"
on:
workflow_dispatch:
inputs:
godot_version:
description: "Godot Version"
required: true
default: "4.2.1"
export_platform:
description: "Export Platform - web"
required: true
default: "web"
export_folder:
description: "Export Folder - Repository Path"
required: true
default: "."
export_name:
description: "Export Name"
required: true
default: "Brave-Frontier-Godot"
permissions:
pages: write
contents: write
env:
PROJECT_PATH: .
GODOT_VERSION: ${{ github.event.inputs.godot_version }}
EXPORT_PLATFORM: ${{ github.event.inputs.export_platform }}
EXPORT_FOLDER: ${{ github.event.inputs.export_folder }}
EXPORT_NAME: ${{ github.event.inputs.export_name }}
jobs:
export_web:
name: Web Export
runs-on: ubuntu-20.04
if: ${{ github.event.inputs.export_platform == 'web' || github.event.inputs.export_platform == 'all' }}
container:
image: barichello/godot-ci:4.2.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
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: Web Build
run: |
cd ${EXPORT_FOLDER}
mkdir -v -p build/web
godot -v --headless --export-release "HTML5" ./build/web/index.html
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: Web
path: ${{ env.EXPORT_FOLDER }}/build/web
# Installing rsync is needed in order to deploy to GitHub Pages. Without it, the build will fail.
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: ${{ env.EXPORT_FOLDER }}/build/web # The folder the action should deploy.