Files
godot-team-reports/.github/workflows/ci.yml
2022-07-14 13:51:06 +03:00

57 lines
1.4 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@v2
- name: Install Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.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: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: web-static
path: out
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
# The branch the action should deploy to.
BRANCH: gh-pages
# The folder the action should deploy.
FOLDER: out
# Don't keep the history.
SINGLE_COMMIT: true