-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (37 loc) · 1.22 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
# Builds React Native app as a webpage and deploys it to GitHub Pages
name: Deploy Web
on:
workflow_dispatch:
push:
branches: [ deploy-web ]
jobs:
build:
runs-on: ubuntu-latest
env:
PUBLIC_URL: "/ReactNativeCardinalBoticsApp"
NODE_ENV: "production"
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Install Dependencies
run: npm install --legacy-peer-deps --save-dev --include=dev
- name: Setup Expo
uses: expo/expo-github-action@v7
with:
expo-version: latest
packager: npm
- name: Build Web App with Expo
run: npx expo export:web
- name: Modify build
run: |
cp assets/web-privacy-policy.html web-build/privacy-policy.html
cp web-build/index.html web-build/404.html
cp assets/pwa-manifest.json web-build/manifest.json
cp -r assets/pwa-icons/chrome-icon web-build/pwa/chrome-icon
cp -r assets/pwa-icons/adaptable-icon web-build/pwa/adaptable-icon
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: web-build