-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.16 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build and deploy main
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
name: Build and deploy main
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- uses: pnpm/action-setup@v2.2.3
with:
version: latest
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
# pass --base for application to work under GitHub pages
- name: Install
run: pnpm install --no-frozen-lockfile
- name: Build
run: pnpm run build -- --base=./
- name: copy index.html to 404.html
run: cp dist/index.html dist/404.html
- name: Deploy to github pages
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
branch: gh-pages
folder: dist
#- name: Publish deployed code
# uses: actions/upload-artifact@v2
# with:
# name: published
# path: dist