This repository has been archived by the owner on Aug 9, 2024. It is now read-only.
Update README.md #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: build-and-deploy-to-branch-deploy | |
env: | |
GODOT_VERSION: 3.4.4 | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
export-web: | |
name: Web Export | |
runs-on: ubuntu-latest | |
container: | |
image: barichello/godot-ci:mono-3.4.4 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- name: Setup | |
run: | | |
mkdir -v -p ~/.local/share/godot/templates | |
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable.mono ~/.local/share/godot/templates/${GODOT_VERSION}.stable.mono | |
- name: Web Build | |
run: | | |
mkdir -v -p build/web | |
godot -v --export "HTML5" ./build/web/index.html | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: web | |
path: 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/v3 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: deploy # The branch the action should deploy to. | |
FOLDER: build/web # The folder the action should deploy. |