From 1aa67cd9f17e907fa6517a6d4a0e406e61190dae Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Thu, 4 Dec 2025 10:25:28 -0600 Subject: [PATCH] Migrate deployment to GitHub Pages --- .github/workflows/ci.yml | 83 ++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55019ff..e776723 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,53 +1,60 @@ 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: - group: pages-ci + group: ${{ github.workflow }}|${{ github.ref_name }} cancel-in-progress: true jobs: build: - name: Build and deploy to GitHub Pages + name: 🛠️ Build runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v5 - - name: Install Node.js 16.x - uses: actions/setup-node@v4 - with: - node-version: 16.x - cache: 'npm' + - name: Setup Pages + uses: actions/configure-pages@v5 - - name: Install dependencies - run: npm ci + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: 24 + cache: npm - - name: Build the static content using npm - run: npm run build + - name: Install dependencies + run: npm ci - - name: Prepare and copy configuration and data - run: npm run publish-db - env: - GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Build the static content using npm + run: npm run build - - name: Archive production artifacts - uses: actions/upload-artifact@v4 - with: - name: web-static - path: out + - name: Prepare and copy configuration and data + run: npm run publish-db + env: + GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Deploy to GitHub Pages 🚀 - uses: JamesIves/github-pages-deploy-action@v4 - with: - branch: gh-pages - folder: out - # Configure the commit author. - git-config-name: 'Godot Organization' - git-config-email: '<>' - # Don't keep the history. - single-commit: true + - name: Upload pages artifact + uses: actions/upload-pages-artifact@v4 + with: + path: out/ + + deploy: + name: 📤 Deploy + runs-on: ubuntu-latest + needs: build + if: github.ref_name == github.event.repository.default_branch + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + permissions: + 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