-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (43 loc) · 1.33 KB
/
push-action.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
name: Deploy to github pages
on:
push:
branches: [main]
jobs:
Check_and_Publish:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Read the pnpm version from the `.pnpmrc` file
- name: Read .pnpmrc
id: pnpm_version
uses: juliangruber/read-file-action@v1
with:
path: ./.pnpmrc
- name: Cache PNPM modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: '${{ steps.pnpm_version.outputs.content }}'
# Read node version from `.nvmrc` file
- id: nvmrc
uses: browniebroke/read-nvmrc-action@v1
- uses: actions/setup-node@v3
with:
# use the output from the action
node-version: '${{ steps.nvmrc.outputs.node_version }}'
- name: Install `node_modules`
run: pnpm install
- name: Lint Check
run: pnpm checks
- name: Build
run: pnpm build
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist