Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(bazel): copy dist folder to aio for firebase deployment #48212

Merged
merged 1 commit into from Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion aio/firebase.json
Expand Up @@ -2,7 +2,7 @@
// Docs on Firebase hosting configuration: https://firebase.google.com/docs/hosting/full-config
"hosting": {
"target": "aio",
"public": "../dist/bin/aio/build",
"public": "dist",
"cleanUrls": true,
//////////////////////////////////////////////////////////////////////////////////////////////
// ADDING REDIRECTS
Expand Down
4 changes: 4 additions & 0 deletions aio/scripts/deploy-to-firebase/index.mjs
Expand Up @@ -384,6 +384,10 @@ function deploy(data) {
u.logSectionHeader('Run pre-deploy actions.');
preDeployActions.forEach(fn => fn(data));

// Firebase requires that the distributable be in the same folder as firebase.json.
u.logSectionHeader('Copy AIO distributable from Bazel output tree to aio/.');
sh.cp('-rf', pre.DIST_DIR, 'dist');

u.logSectionHeader('Deploy AIO to Firebase hosting.');
const firebase = cmd => u.yarn(`firebase ${cmd} --token "${firebaseToken}"`);
firebase(`use "${projectId}"`);
Expand Down
1 change: 1 addition & 0 deletions aio/scripts/deploy-to-firebase/pre-deploy-actions.mjs
Expand Up @@ -14,6 +14,7 @@ const exp = {
build,
checkPayloadSize,
disableServiceWorker,
DIST_DIR,
undo: {
build: undoBuild,
checkPayloadSize: undoCheckPayloadSize,
Expand Down