-
-
Notifications
You must be signed in to change notification settings - Fork 155
57 lines (48 loc) · 1.49 KB
/
static.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
name: Deploy Static Files
on:
push:
branches:
- main
jobs:
deploy-static-files:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: true
# Examples
- name: Building Examples
run: |
pnpm -r build
- name: Copy Examples
run: |
mkdir -p public/examples/minecraft
mkdir -p public/examples/pingpong
mkdir -p public/examples/rag-doll
mkdir -p public/examples/stage
mkdir -p public/examples/watch
mkdir -p public/examples/room-with-shadows
cp -r ./examples/minecraft/dist/* ./public/examples/minecraft
cp -r ./examples/pingpong/dist/* ./public/examples/pingpong
cp -r ./examples/rag-doll/dist/* ./public/examples/rag-doll
cp -r ./examples/stage/dist/* ./public/examples/stage
cp -r ./examples/watch/dist/* ./public/examples/watch
cp -r ./examples/room-with-shadows/dist/* ./public/examples/room-with-shadows
# Deploy to GH Pages
- name: Add no jekyll
run: touch public/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: public