-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (41 loc) · 1.31 KB
/
git-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
# workflow to make a read-only anonymous copy of the git repo available at a "secret" URL:
# git clone https://croquet.github.io/croquet-for-unity-tutorials/croquet-for-unity-tutorials.git
# NOTE: to make this work, in GitHub Settings under Pages – Build and Deployment
# change Source from "Deploy from a branch" to "GitHub Actions"!
name: Git 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:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch full history
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Create repo croquet-for-unity-tutorials.git
run: |
git clone --bare . _site/croquet-for-unity-tutorials.git
git -C _site/croquet-for-unity-tutorials.git update-server-info
- name: Upload _site
uses: actions/upload-pages-artifact@v1
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1