-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (36 loc) · 1.11 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
# 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 --save-dev --include=dev
- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
packager: npm
- name: Build Web App with Expo
run: npx expo export -p web --output-dir web-build/
- name: Modify build
run: |
npx workbox-cli generateSW workbox-config.js
cp assets/web-privacy-policy.html web-build/privacy-policy.html
cp web-build/index.html web-build/404.html
touch web-build/.nojekyll
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: web-build