Skip to content

Commit

Permalink
Deploy Expo web instead of vanilla React (#318)
Browse files Browse the repository at this point in the history
* Possible expo-web build?
* Try to deploy
  • Loading branch information
NigelBreslaw authored Feb 7, 2024
1 parent 70f4c2f commit 1f55e8e
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy-gg-web.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
paths:
- 'gg-mono/apps/react-frontend/**'
- 'native_gg/**'
jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -10,7 +10,7 @@ jobs:
TURBO_CODE: ${{ secrets.TURBO_CODE }}
defaults:
run:
working-directory: gg-mono
working-directory: native_gg
permissions:
contents: read
deployments: write
Expand All @@ -23,12 +23,12 @@ jobs:
- name: install dependencies
run: pnpm install --frozen-lockfile
- name: build
run: cd apps/react-frontend && pnpm build:ci
- name: deploy dashboard
run: pnpm expo export -p web
- name: deploy website
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: gg-app
directory: gg-mono/apps/react-frontend/dist # e.g. 'dist'
directory: native_gg/dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
6 changes: 4 additions & 2 deletions native_gg/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ export default function App() {
}, [url]);

function openURL(url: string) {
console.log("Opening URL in WebBrowser");
WebBrowser.openAuthSessionAsync(url, null);
console.log("Opening URL in WebBrowser!");
WebBrowser.openAuthSessionAsync(url, "https://guardianghost.com/auth").then((result) => {
console.log("WebBrowser result", result);
});
}

return (
Expand Down
2 changes: 2 additions & 0 deletions native_gg/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
]
},
"web": {
"output": "single",
"bundler": "metro",
"favicon": "./assets/favicon.png"
},
"plugins": [
Expand Down
23 changes: 23 additions & 0 deletions native_gg/public/.well-known/apple-app-site-association
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"applinks": {
"details": [
{
"appIDs": ["X2Z8M625Y9.com.guardianghost.mobile"],
"components": [
{
"#": "no_universal_links",
"exclude": true,
"comment": "Matches any URL with a fragment that equals no_universal_links and instructs the system not to open it as a universal link."
},
{
"/": "/auth",
"comment": "Matches a URL with a path that starts with /auth."
}
]
}
]
},
"webcredentials": {
"apps": ["X2Z8M625Y9.com.guardianghost.mobile"]
}
}
13 changes: 13 additions & 0 deletions native_gg/public/.well-known/assetlinks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.guardianghost",
"sha256_cert_fingerprints": [
"03:8C:FF:63:6D:B2:BB:00:0D:37:4D:AF:D3:37:CC:CA:48:9B:BF:33:0B:EB:91:86:20:79:80:16:AE:E9:B2:FB",
"FA:C6:17:45:DC:09:03:78:6F:B9:ED:E6:2A:96:2B:39:9F:73:48:F0:BB:6F:89:9B:83:32:66:75:91:03:3B:9C"
]
}
}
]

0 comments on commit 1f55e8e

Please sign in to comment.