-
Notifications
You must be signed in to change notification settings - Fork 8
78 lines (72 loc) · 1.86 KB
/
deploy-example.yaml
File metadata and controls
78 lines (72 loc) · 1.86 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
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: Deploy example app to gh-pages
on:
# pull_request: {}
push:
branches:
- master
workflow_dispatch: {}
jobs:
build:
name: Build react-liff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: npm
- run: npm ci
- run: npm run build
- name: Upload the result of build react-liff
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
build-example-app:
name: Build example app
runs-on: ubuntu-latest
needs:
- build
defaults:
run:
working-directory: examples/simple
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: npm
- name: Download the result of build react-liff
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- run: npm i
- run: npm run build
env:
REACT_APP_LINE_LIFF_ID: ${{ secrets.LINE_LIFF_ID }}
NODE_ENV: production
PUBLIC_URL: /react-liff
- name: Upload the result of build react-liff
uses: actions/upload-artifact@v3
with:
name: build
path: examples/simple/build
deploy:
name: Deploy to gh-pages
runs-on: ubuntu-latest
needs:
- build-example-app
steps:
- name: Download the result of build react-liff
uses: actions/download-artifact@v3
with:
name: build
path: examples/simple/build
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
cname: www.epaew.net
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./examples/simple/build