-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (48 loc) · 1.16 KB
/
ci.yaml
File metadata and controls
48 lines (48 loc) · 1.16 KB
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
name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Restore node-modules cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn install
run: yarn install --frozen-lockfile --prefer-offline
- name: Prettier Code Check
run: yarn fmt:check
- name: yarn lint
run: yarn lint
- name: yarn build
run: yarn build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./out
deploy:
if: ${{ github.ref_name == 'main' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2