-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.02 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
name: Publish Portfolio
on:
push:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Use Node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install dependencies
run: npm install
- name: Run Tests
run: npm run test --if-present
- name: Build website
run: npm run build --if-present
- name: Run Lighthouse Audits
uses: treosh/lighthouse-ci-action@v3
with:
uploadArtifacts: true
temporaryPublicStorage: true
configPath: "./lighthouserc.json"
runs: 3
build-deploy:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Build and Deploy Gatsby Site
uses: enriikke/gatsby-gh-pages-action@v2
with:
access-token: ${{ secrets.ACCESS_TOKEN }}
deploy-branch: release