You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(ci): copy deployment files inside the respective Firebase directories
We have the `scripts/{code,docs}.angularjs.org-firebase/` directories,
which contain the necessary code and config for deploying built files to
`code-angularjs-org` and `docs-angularjs-org` Firebase directories
respectively.
Previously, some of the files that needed to be deployed to Firebase (or
Google Cloud) were placed inside these directories (e.g.
`docs.angularjs.org-firebase/functions/content/`) and others were places
outside (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/public/ |
| scripts/docs.angularjs.org-firebase/functions/content/ | scripts/docs.angularjs.org-firebase/deploy/ |
This folder contains the Google Firebase scripts for the code.angularjs.org setup.
4
+
This folder contains the Google Firebase scripts for the `code.angularjs.org` setup.
5
5
6
-
firebase.json contains the rewrite rules that route every subdirectory request to the cloud function
7
-
in functions/index.js that serves the docs from the Firebase Google Cloud Storage bucket.
6
+
`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.
8
7
9
-
functions/index.js also contains a rule that deletes outdated build zip files
10
-
from the snapshot and snapshot-stable folders when new zip files are uploaded.
8
+
`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.
11
9
12
-
The deployment to the Google Cloud Storage bucket happens automatically via CI.
13
-
See the .circleci/config.yml file in the repository root.
10
+
See `/scripts/docs.angularjs.org-firebase/readme.firebase.code.md` for the Firebase deployment to `docs.angularjs.org`.
14
11
15
-
See /readme.firebase.docs.md for the firebase deployment to docs.angularjs.org
12
+
# Continuous integration
13
+
14
+
The code is deployed to Google Firebase hosting and functions as well as to the Google Cloud Storage bucket automatically via CI.
15
+
See `.circleci/config.yml` for the complete deployment config and build steps.
This folder contains the Google Firebase scripts for the `docs.angularjs.org` setup.
5
+
6
+
See `/scripts/code.angularjs.org-firebase/readme.firebase.code.md` for the Firebase deployment to `code.angularjs.org`.
7
+
4
8
# Continuous integration
5
9
6
-
The docs are deployed to Google Firebase hosting via a CI deployment config, which expects
7
-
firebase.json to be in the repository root, which is done by a Grunt task
8
-
(`firebaseDocsJsonForCI` which is included in `prepareDeploy`).
9
-
The `firebaseDocsJsonForCI` task modifies the paths in the `firebase.json` and copies it to the
10
-
repository root.
10
+
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`).
11
+
The `firebaseDocsJsonForCI` task modifies the paths in the `firebase.json` and copies it to the repository root.
11
12
12
-
See .circleci/config.yml for the complete deployment config and build steps.
13
+
See `.circleci/config.yml` for the complete deployment config and build steps.
13
14
14
15
# Serving locally:
15
16
16
17
- Run `yarn grunt package`.
17
18
This builds the files that will be deployed.
18
19
19
20
- Run `yarn grunt prepareDeploy`.
20
-
This copies docs content files into deploy/docs and the partials for Search Engine AJAX
21
-
Crawling into ./functions/content.
22
-
It also moves the firebase.json file to the root folder, where the firebase-cli expects it
21
+
This copies docs content files into `./public` and the partials for Search Engine AJAX Crawling into `./deploy`.
22
+
It also moves the `firebase.json` file to the root folder, where the firebase-cli expects it.
23
23
24
24
- Run `firebase serve --only functions,hosting`
25
-
Creates a server at localhost:5000 that serves from deploy/docs and uses the local function
26
-
27
-
See /scripts/code.angularjs.org-firebase/readme.firebase.code.md for the firebase deployment to
28
-
code.angularjs.org
25
+
Creates a server at http://localhost:5000 that serves from `./public` and uses the local function.
0 commit comments