-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (45 loc) · 1.49 KB
/
website-pr-testing.yml
File metadata and controls
53 lines (45 loc) · 1.49 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
49
50
51
52
53
name: Test website
on:
pull_request_target:
paths:
- 'website'
- 'website/vercel.json'
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 Vercel Preview
uses: patrickedqvist/wait-for-vercel-preview@v1.3.2
id: vercel
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 600
check_interval: 10