-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.44 KB
/
website-pr-testing.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
name: Test website
on:
pull_request_target:
paths:
- 'website'
- 'netlify.toml'
branches:
- main
types: [opened, reopened, synchronize, ready_for_review]
jobs:
lighthouse-ci:
name: Lighthouse CI
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Website Install dependencies
id: first-installation-website
run: cd website && npm install --loglevel verbose
continue-on-error: true
- if: steps.first-installation-website.outputs.status == 'failure'
name: Website Clear NPM cache and install deps again
run: |
cd website && npm cache clean --force
cd website && npm install --loglevel verbose
- name: Lint website
run: cd website && npm run lint
- name: Build website
run: cd website && npm run build
- name: Await Netlify Preview
uses: jakepartusch/wait-for-netlify-action@v1
id: netlify
with:
site_name: the-codegen-project
max_timeout: 600