-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1008 Bytes
/
deploy.yml
File metadata and controls
46 lines (37 loc) · 1008 Bytes
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
name: Deploy
on:
push:
branches: [main]
env:
NODE_VERSION: "18.x"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v2
- name: 🤖 Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: 📦 Cache Node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: 📥 Install deps
run: npm ci
- name: ✨ npm lint
run: npm run lint
- name: 🧪 npm test
run: npm run test
- name: 🚧 npm build
run: npm run build
- name: 🚀 Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages
folder: dist