-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 2.23 KB
/
ci.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
66
67
68
69
70
71
72
73
74
75
76
77
78
---
name: ci
on:
- push
- pull_request_target
permissions: write-all
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
B2_APPLICATION_KEY_ID: ${{ secrets.B2_APPLICATION_KEY_ID }}
B2_APPLICATION_KEY: ${{ secrets.B2_APPLICATION_KEY }}
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
lfs: true
- uses: actions/cache@v3
with:
path: |
**/public
**/resources
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Install Node
uses: actions/setup-node@v4
- name: Install Task
uses: arduino/setup-task@v2
- name: Build
run: task ci
- name: Deploy to Netlify (dev)
uses: nwtgck/[email protected]
id: netlify
with:
publish-dir: './public'
production-deploy: false
github-deployment-environment: 'dev'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
timeout-minutes: 1
- name: Audit URLs using Lighthouse
uses: treosh/[email protected]
with:
urls: |
${{ steps.netlify.outputs.deploy-url }}
${{ steps.netlify.outputs.deploy-url }}/blog/
${{ steps.netlify.outputs.deploy-url }}/gallery/
${{ steps.netlify.outputs.deploy-url }}/gallery/street-01-2020/
budgetPath: ./.github/lighthouse/budget.json
uploadArtifacts: true
- name: Deploy to Netlify (prod)
if: github.ref == 'refs/heads/master'
uses: nwtgck/[email protected]
with:
publish-dir: './public'
production-deploy: true
github-deployment-environment: 'prod'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
timeout-minutes: 1