Skip to content

Commit a0a6ec9

Browse files
committed
Add gh-pages workflow with baseurl
1 parent 211ef49 commit a0a6ec9

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
submodules: true
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 20
31+
cache: yarn
32+
33+
- name: Enable Corepack
34+
run: corepack enable
35+
36+
- name: Install dependencies
37+
run: yarn install --frozen-lockfile
38+
39+
- name: Build
40+
run: yarn gulp release --baseHref "/${{ github.event.repository.name }}/"
41+
env:
42+
NODE_OPTIONS: "--max_old_space_size=4096"
43+
44+
- name: Disable Jekyll
45+
run: touch wwwroot/.nojekyll
46+
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: wwwroot
51+
52+
deploy:
53+
needs: build
54+
runs-on: ubuntu-latest
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)