-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (49 loc) · 1.49 KB
/
deploy-to-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Workflow to build a GitHub Pages site for all examples and tutorials
# and deploy it to https://croquet.github.io/worldcore/
# The actual work is done in scripts/build-pages.sh
# 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 and not forks
# (change this in your fork if you want it there)
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: Configure 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
env:
SLACK_HOOK_URL: ${{ secrets.SLACK_HOOK_URL }}
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