Skip to content

Commit f10078e

Browse files
committed
add deploy workflow
1 parent 046b404 commit f10078e

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/deploy.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/[email protected]
13+
with:
14+
submodules: recursive
15+
- name: Use Node.js 20
16+
uses: actions/[email protected]
17+
with:
18+
node-version-file: .nvmrc
19+
- name: Cache NPM dependencies
20+
uses: actions/[email protected]
21+
with:
22+
path: node_modules
23+
key: ${{ runner.OS }}-npm-cache
24+
restore-keys: ${{ runner.OS }}-npm-cache
25+
- name: Install Dependencies
26+
run: yarn install
27+
- name: Build
28+
run: yarn build
29+
- name: Upload Pages artifact
30+
uses: actions/[email protected]
31+
with:
32+
path: ./public
33+
deploy:
34+
needs: build
35+
permissions:
36+
pages: write
37+
id-token: write
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/[email protected]

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

0 commit comments

Comments
 (0)