mirror of
https://github.com/godotengine/godot-interactive-changelog.git
synced 2025-12-31 01:49:28 +03:00
Migrate deployment to GitHub Pages
This commit is contained in:
83
.github/workflows/ci.yml
vendored
83
.github/workflows/ci.yml
vendored
@@ -1,53 +1,60 @@
|
|||||||
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
|
||||||
with:
|
|
||||||
node-version: 16.x
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Setup Node.js
|
||||||
run: npm ci
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
cache: npm
|
||||||
|
|
||||||
- name: Build the static content using npm
|
- name: Install dependencies
|
||||||
run: npm run build
|
run: npm ci
|
||||||
|
|
||||||
- name: Prepare and copy configuration and data
|
- name: Build the static content using npm
|
||||||
run: npm run publish-db
|
run: npm run build
|
||||||
env:
|
|
||||||
GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Archive production artifacts
|
- name: Prepare and copy configuration and data
|
||||||
uses: actions/upload-artifact@v4
|
run: npm run publish-db
|
||||||
with:
|
env:
|
||||||
name: web-static
|
GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }}
|
||||||
path: out
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages 🚀
|
- name: Upload pages artifact
|
||||||
uses: JamesIves/github-pages-deploy-action@v4
|
uses: actions/upload-pages-artifact@v4
|
||||||
with:
|
with:
|
||||||
branch: gh-pages
|
path: out/
|
||||||
folder: out
|
|
||||||
# Configure the commit author.
|
deploy:
|
||||||
git-config-name: 'Godot Organization'
|
name: 📤 Deploy
|
||||||
git-config-email: '<>'
|
runs-on: ubuntu-latest
|
||||||
# Don't keep the history.
|
needs: build
|
||||||
single-commit: true
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user