Skip to content

Instantly share code, notes, and snippets.

@keith-kurak
Created December 18, 2021 05:17
Show Gist options
  • Save keith-kurak/9a65287fe60b91a76635b74c19cec7b8 to your computer and use it in GitHub Desktop.
Save keith-kurak/9a65287fe60b91a76635b74c19cec7b8 to your computer and use it in GitHub Desktop.
06: Hello, deploy!
Add files and bits needed to deploy and build apps
// add required bits to build iOS and/ or Android apps
// must have app identifiers/ package name/ build number/ version code
"ios": {
"bundleIdentifier": "com.company.changeme",
"supportsTablet": true,
"buildNumber": "1"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.company.changeme",
"versionCode": 1
},
// create this file, which points firebase hosting to the web build folder
"hosting": {
"public": "web-build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "/**",
"headers": [
{
"key": "Cache-Control",
"value": "no-cache, no-store, must-revalidate"
}
]
},
{
"source": "**/*.@(jpg|jpeg|gif|png|svg|webp|js|css|eot|otf|ttf|ttc|woff|woff2|font.css)",
"headers": [
{
"key": "Cache-Control",
"value": "max-age=604800"
}
]
}
]
}
}
// add command to deploy web app
"predeploy": "expo build:web",
"deploy-hosting": "npm run predeploy && firebase deploy --only hosting"
@keith-kurak
Copy link
Author

keith-kurak commented Dec 18, 2021

To publish to Expo for use in the Expo Go app only / also to publish an OTA update
expo publish

To build a binary app on Expo's servers
expo build:ios or expo build:android --type apk (do apk to easily install on your phone)

To build web version and publish to firebase hosting
yarn deploy-hosting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment