Continuous integration #14198
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
name: Continuous integration | |
on: | |
push: | |
branches: [ master ] | |
schedule: | |
# Run every hour at 10 minutes past the hour mark. | |
# The slight offset is there to try and avoid the high load times. | |
- cron: '10 * * * *' | |
# 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@v3 | |
- name: Checkout published data | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
path: out | |
- name: Install Node.js 16.x | |
uses: actions/setup-node@v3 | |
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 artifact data (master) | |
run: npm run compose-db -- branch:master | |
env: | |
GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fetch artifact data (4.0) | |
run: npm run compose-db -- branch:4.0 | |
env: | |
GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fetch artifact data (3.x) | |
run: npm run compose-db -- branch:3.x | |
env: | |
GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fetch artifact data (3.5) | |
run: npm run compose-db -- branch:3.5 | |
env: | |
GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: web-static | |
path: out | |
- 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 |