Migrate deployment to GitHub Pages

This commit is contained in:
Thaddeus Crews
2025-12-04 10:25:28 -06:00
parent 7ee6a283c7
commit 1aa67cd9f1

View File

@@ -1,27 +1,26 @@
name: Continuous integration name: Continuous integration
on: [push, pull_request, workflow_dispatch]
on:
push:
branches: [ master ]
# Make sure jobs cannot overlap (e.g. one from push and one from schedule).
concurrency: concurrency:
group: pages-ci group: ${{ github.workflow }}|${{ github.ref_name }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
build: build:
name: Build and deploy to GitHub Pages name: 🛠️ Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - name: Checkout
uses: actions/checkout@v5
- name: Install Node.js 16.x - name: Setup Pages
uses: actions/setup-node@v4 uses: actions/configure-pages@v5
- name: Setup Node.js
uses: actions/setup-node@v6
with: with:
node-version: 16.x node-version: 24
cache: 'npm' cache: npm
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@@ -35,19 +34,27 @@ jobs:
GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }} GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive production artifacts - name: Upload pages artifact
uses: actions/upload-artifact@v4 uses: actions/upload-pages-artifact@v4
with: with:
name: web-static path: out/
path: out
- name: Deploy to GitHub Pages 🚀 deploy:
uses: JamesIves/github-pages-deploy-action@v4 name: 📤 Deploy
with: runs-on: ubuntu-latest
branch: gh-pages needs: build
folder: out if: github.ref_name == github.event.repository.default_branch
# Configure the commit author. environment:
git-config-name: 'Godot Organization' name: github-pages
git-config-email: '<>' url: ${{ steps.deployment.outputs.page_url }}
# Don't keep the history. permissions:
single-commit: true contents: read
id-token: write
pages: write
concurrency:
group: ci-deploy
cancel-in-progress: false
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4