forked from angular/angular.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): copy deployment files inside the respective Firebase direc…
…tories We have the `scripts/{code,docs}.angularjs.org-firebase/` directories, which contain the necessary code and config for deploying built files to the `code-angularjs-org` and `docs-angularjs-org` Firebase projects respectively. Previously, some of the files that needed to be deployed to Firebase (or Google Cloud) were placed outside these directories (e.g. in `deploy/{code,docs}/`). Since these files are only used for deploying to Firebase/Google Cloud, this commit changes the deployment process to instead copy the files inside the directories. In a subsequent commit, this will allow simplifying the deployment process, by running it from inside each directory instead of having to copy the `firebase.json` files to the repository root (and adjust the paths). These are the destination directory changes: | Before | After | |--------------|---------------------------------------------| | deploy/code/ | scripts/code.angularjs.org-firebase/deploy/ | | deploy/docs/ | scripts/docs.angularjs.org-firebase/deploy/ |
- Loading branch information
Showing
7 changed files
with
39 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
scripts/code.angularjs.org-firebase/readme.firebase.code.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
Firebase for code.angularjs.org | ||
=============================== | ||
|
||
This folder contains the Google Firebase scripts for the code.angularjs.org setup. | ||
This folder contains the Google Firebase scripts for the `code.angularjs.org` setup. | ||
|
||
firebase.json contains the rewrite rules that route every subdirectory request to the cloud function | ||
in functions/index.js that serves the docs from the Firebase Google Cloud Storage bucket. | ||
`firebase.json` contains the rewrite rules that route every subdirectory request to the cloud function in `functions/index.js` that serves the docs from the Firebase Google Cloud Storage bucket. | ||
|
||
functions/index.js also contains a rule that deletes outdated build zip files | ||
from the snapshot and snapshot-stable folders when new zip files are uploaded. | ||
`functions/index.js` also contains a rule that deletes outdated build zip files from the snapshot and snapshot-stable folders when new zip files are uploaded. | ||
|
||
The deployment to the Google Cloud Storage bucket happens automatically via CI. | ||
See the .circleci/config.yml file in the repository root. | ||
See `/scripts/docs.angularjs.org-firebase/readme.firebase.code.md` for the Firebase deployment to `docs.angularjs.org`. | ||
|
||
See /readme.firebase.docs.md for the firebase deployment to docs.angularjs.org | ||
# Continuous integration | ||
|
||
The code is deployed to Google Firebase hosting and functions as well as to the Google Cloud Storage bucket automatically via CI. | ||
See `.circleci/config.yml` for the complete deployment config and build steps. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 10 additions & 13 deletions
23
scripts/docs.angularjs.org-firebase/readme.firebase.docs.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
Firebase for docs.angularjs.org | ||
=============================== | ||
|
||
This folder contains the Google Firebase scripts for the `docs.angularjs.org` setup. | ||
|
||
See `/scripts/code.angularjs.org-firebase/readme.firebase.code.md` for the Firebase deployment to `code.angularjs.org`. | ||
|
||
# Continuous integration | ||
|
||
The docs are deployed to Google Firebase hosting via a CI deployment config, which expects | ||
firebase.json to be in the repository root, which is done by a Grunt task | ||
(`firebaseDocsJsonForCI` which is included in `prepareDeploy`). | ||
The `firebaseDocsJsonForCI` task modifies the paths in the `firebase.json` and copies it to the | ||
repository root. | ||
The docs are deployed to Google Firebase hosting via a CI deployment config, which expects `firebase.json` to be in the repository root, which is done by a Grunt task (`firebaseDocsJsonForCI` which is included in `prepareDeploy`). | ||
The `firebaseDocsJsonForCI` task modifies the paths in the `firebase.json` and copies it to the repository root. | ||
|
||
See .circleci/config.yml for the complete deployment config and build steps. | ||
See `.circleci/config.yml` for the complete deployment config and build steps. | ||
|
||
# Serving locally: | ||
|
||
- Run `yarn grunt package`. | ||
This builds the files that will be deployed. | ||
|
||
- Run `yarn grunt prepareDeploy`. | ||
This copies docs content files into deploy/docs and the partials for Search Engine AJAX | ||
Crawling into ./functions/content. | ||
It also moves the firebase.json file to the root folder, where the firebase-cli expects it | ||
This copies docs content files into `./deploy` and the partials for Search Engine AJAX Crawling into `./functions/content`. | ||
It also moves the `firebase.json` file to the root folder, where the firebase-cli expects it. | ||
|
||
- Run `firebase serve --only functions,hosting` | ||
Creates a server at localhost:5000 that serves from deploy/docs and uses the local function | ||
|
||
See /scripts/code.angularjs.org-firebase/readme.firebase.code.md for the firebase deployment to | ||
code.angularjs.org | ||
Creates a server at http://localhost:5000 that serves from `./deploy` and uses the local function. |