Skip to content

Commit 1e81709

Browse files
committed
ci: added deploy workflow
1 parent ccb5056 commit 1e81709

File tree

2 files changed

+66
-1
lines changed

2 files changed

+66
-1
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Checkout
3535
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3636

37-
- name: Setup PNPM
37+
- name: Setup pnpm
3838
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
3939

4040
- name: Setup Node.js

.github/workflows/deploy.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- '**.md'
9+
- .gitignore
10+
- 'assets/**'
11+
- '.github/**'
12+
- '!.github/workflows/deploy.yml'
13+
14+
workflow_dispatch:
15+
16+
jobs:
17+
deploy:
18+
name: Deploy
19+
runs-on: ubuntu-latest
20+
21+
permissions:
22+
contents: read
23+
pages: write
24+
id-token: write
25+
26+
concurrency:
27+
group: pages
28+
cancel-in-progress: false
29+
30+
environment:
31+
name: github-pages
32+
url: ${{ steps.deployment.outputs.page_url }}
33+
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
37+
38+
- name: Setup pnpm
39+
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
40+
41+
- name: Setup Node.js
42+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
43+
with:
44+
node-version: 18
45+
cache: pnpm
46+
47+
- name: Configure GitHub Pages
48+
uses: actions/[email protected]
49+
with:
50+
static_site_generator: sveltekit
51+
52+
- name: Install dependencies
53+
run: pnpm install
54+
55+
- name: Build
56+
run: pnpm run build
57+
58+
- name: Upload GitHub Pages artifact
59+
uses: actions/[email protected]
60+
with:
61+
path: dist
62+
63+
- name: Deploy GitHub Pages site
64+
id: deployment
65+
uses: actions/[email protected]

0 commit comments

Comments
 (0)