Skip to content

Commit 21de97b

Browse files
add: ci for GitHub pages (#255)
1 parent acf2e84 commit 21de97b

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/github-pages.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy GitHub Pages
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
12+
- name: Build site
13+
run: |
14+
rm -rf dist
15+
mkdir -p dist
16+
cp ./docs.html ./dist/index.html
17+
18+
- name: Upload Pages artifact
19+
uses: actions/upload-pages-artifact@v3
20+
with:
21+
path: dist
22+
23+
deploy:
24+
needs: build
25+
26+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
27+
permissions:
28+
pages: write # to deploy to Pages
29+
id-token: write # to verify the deployment originates from an appropriate source
30+
31+
# Deploy to the github-pages environment
32+
environment:
33+
name: github-pages
34+
url: ${{ steps.deployment.outputs.page_url }}
35+
36+
# Specify runner + deployment step
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@v4
42+

0 commit comments

Comments
 (0)