tutorial09: suppress redundant events #170
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
# Workflow to build a GitHub Pages site for multiple branches simultaneously | |
# NOTE: to make this work, in GitHub Settings under Pages – Build and Deployment | |
# change Source from "Deploy from a branch" to "GitHub Actions"! | |
# NOTE: to make this work, in GitHub Settings under Pages – Build and Deployment | |
# change Source from "Deploy from a branch" to "GitHub Actions"! | |
name: Deploy to Pages | |
on: | |
# only execute on push to main | |
push: | |
branches: | |
- main | |
# or manually in the GitHub UI | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: pages | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
# only run on main repo | |
if: github.repository == 'croquet/worldcore' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # fetch full history | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Build tutorials and examples | |
run: scripts/build-pages.sh | |
- name: Upload _site | |
uses: actions/upload-pages-artifact@v3 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |