-
-
Notifications
You must be signed in to change notification settings - Fork 14
65 lines (55 loc) · 1.44 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI
on: push
jobs:
build:
name: Build app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Lint
run: pnpm run lint
- name: Build
env:
OAUTH_URI: ${{ secrets.OAUTH_URI }}
OAUTH_SCOPE: ${{ secrets.OAUTH_SCOPE }}
OAUTH_CLIENT_ID: ${{ secrets.OAUTH_CLIENT_ID }}
ACKEE_HOST: ${{ secrets.ACKEE_HOST }}
ACKEE_DOMAIN_ID: ${{ secrets.ACKEE_DOMAIN_ID }}
run: pnpm run build
- name: Upload artifact
if: success()
uses: actions/upload-artifact@v3
with:
name: app
path: dist
deploy:
name: Deploy app to GitHub Pages
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: app
path: dist
- name: Pre-Deploy
run: |
cp dist/index.html dist/404.html
touch dist/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist