Files
godot-team-reports/.github/workflows/ci.yml
2025-11-25 23:33:49 +01:00

69 lines
1.7 KiB
YAML

name: Continuous integration
on:
push:
branches: [ master ]
schedule:
# Run every 15 minutes of every hour, starting at 5 minutes (5m, 20m, 35m, 50m).
# The slight offset is there to try and avoid the high load times.
- cron: '5/15 * * * *'
# Make sure jobs cannot overlap (e.g. one from push and one from schedule).
concurrency:
group: pages-ci
cancel-in-progress: true
jobs:
build:
name: Build and deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node.js 16.x
uses: actions/setup-node@v4
with:
node-version: 16.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build the static content using npm
run: npm run build
- name: Fetch pull request data
run: npm run compose-db
env:
GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check that data.json was created
id: check_data
run: |
if [ -f "out/data.json" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Archive production artifacts
if: steps.check_data.outputs.exists == 'true'
uses: actions/upload-artifact@v4
with:
name: web-static
path: out
- name: Deploy to GitHub Pages 🚀
if: steps.check_data.outputs.exists == 'true'
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