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

Commit 391e0a6

Browse files
authored
Add GitHub Actions workflow for deploying pages
1 parent bfa1ceb commit 391e0a6

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy pages
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: 'lts/*'
27+
28+
- name: Setup @antfu/ni
29+
run: npm i -g @antfu/ni
30+
31+
- name: Install dependencies
32+
run: nci
33+
34+
- name: Build
35+
run: nr build --base /${{github.event.repository.name}}/
36+
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
40+
- uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: dist
43+
44+
deploy:
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
needs: build
49+
runs-on: ubuntu-latest
50+
name: Deploy
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)