-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.53 KB
/
gh-pages.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
name: Demo app
on:
workflow_run:
workflows: ["Package"]
branches: [master]
types:
- completed
jobs:
demo-test:
name: "Test the demo app"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: demo/package-lock.json
- run: npm ci --prefix lib
- run: npm run build --prefix lib
- run: npm ci --prefix demo
- run: cd lib && npm link && cd ..
- run: cd demo && npm link shadows-js && cd ..
- run: npm run build --if-present --prefix demo
- run: npm test --prefix demo
demo-deploy:
name: "Deploy the demo app"
needs:
- demo-test
if: ${{ github.event.workflow_run.conclusion == 'success' }}
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- run: npm ci --prefix lib
- run: npm run build --prefix lib
- run: npm ci --prefix demo
- run: cd lib && npm link && cd ..
- run: cd demo && npm link shadows-js && cd ..
- run: npm run build --prefix demo
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.2.2
with:
branch: gh-pages
folder: demo/build