Skip to content

Commit e338a93

Browse files
authored
Create build-private-example-web.yml
1 parent 7b0cba7 commit e338a93

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: build-deploy-private-example-web
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
deploy:
7+
runs-on: ubuntu-latest
8+
env:
9+
TEST_ENDPOINT: hd-example.onekeytest.com
10+
PROJECT_PATH: packages/connect-examples/expo-example
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Setup Environment
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: '20'
17+
registry-url: 'https://registry.npmjs.org'
18+
19+
- name: Install Package
20+
run: |
21+
yarn
22+
yarn bootstrap
23+
24+
- name: Build Target
25+
run: |
26+
yarn build
27+
28+
- name: Build Web App
29+
run: |
30+
yarn expo export:web
31+
working-directory: ${{ env.PROJECT_PATH }}
32+
33+
- name: Copy index.html to 404.html for Github Pages deployment (client-side routing)
34+
run: cp web-build/index.html web-build/404.html
35+
working-directory: ${{ env.PROJECT_PATH }}
36+
37+
- name: Deploy Github Pages
38+
uses: peaceiris/actions-gh-pages@v3
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
publish_dir: ./${{ env.PROJECT_PATH }}/web-build
42+
cname: ${{ env.TEST_ENDPOINT }}
43+
force_orphan: true

0 commit comments

Comments
 (0)