Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit fd8766d

Browse files
authored
tools: deploy site via GitHub pages (#2724)
1 parent d56388c commit fd8766d

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/github-pages.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
# Allow workflow to be called manually
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-and-upload:
12+
permissions:
13+
contents: read
14+
pages: read
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
with:
21+
ref: main
22+
23+
- name: Setup Pages
24+
uses: actions/configure-pages@v1
25+
26+
- name: Use Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 16.x
30+
31+
# Build the site
32+
- name: Install npm packages
33+
run: npm ci
34+
- name: Build documentation
35+
run: npm run build
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v1
38+
with:
39+
path: './public'
40+
41+
deploy:
42+
permissions:
43+
pages: write
44+
id-token: write
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
runs-on: ubuntu-latest
49+
needs: build-and-upload
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)