-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (39 loc) · 1.29 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: Build, Test & Publish to GitHub Pages
on:
push:
branches: [ master ]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Install
run: |
npm ci --legacy-peer-deps
- name: Test and Build
run: |
npm run test
npm run prepare
- name: Build Storybook and move it to www dir
run: |
npm run build-storybook -- -o www/stencil-qrcode-component/storybook --quiet
- name: Run LightHouse on static site
run: |
npm install -g @lhci/[email protected]
lhci autorun --staticDistDir www/stencil-qrcode-component/ --autodiscoverUrlBlocklist /storybook/
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
- name: Publish to GitHub Pages (if triggered from master)
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/master'
with:
branch: gh-pages
folder: www/stencil-qrcode-component