Skip to content

Commit 5a175c3

Browse files
ycmjasonyyx990803
authored andcommitted
docs: add deploy guide for firebase (#213)
1 parent 4d5c50e commit 5a175c3

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

docs/guide/deploy.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The following guides are based on a few shared assumptions:
1616

1717
## GitHub Pages
1818

19-
1. Set correct `base` in `.vuepress/config.js`.
19+
1. Set correct `base` in `docs/.vuepress/config.js`.
2020

2121
If you are deploying to `https://<USERNAME>.github.io/`, you can omit `base` as it defaults to `"/"`.
2222

@@ -64,3 +64,30 @@ cd -
6464
- **Publish directory:** `docs/.vuepress/dist`
6565

6666
2. Hit the deploy button!
67+
68+
## Google Firebase
69+
70+
1. Make sure you have [firebase-tools](https://www.npmjs.com/package/firebase-tools) installed.
71+
72+
2. Create `firebase.json` and `.firebaserc` at the root of your project with the following content:
73+
74+
`firebase.json`:
75+
```json
76+
{
77+
"hosting": {
78+
"public": "./docs/.vuepress/dist",
79+
"ignore": []
80+
}
81+
}
82+
```
83+
84+
`.firebaserc`:
85+
```js
86+
{
87+
"projects": {
88+
"default": "<YOUR_FIREBASE_ID>"
89+
}
90+
}
91+
```
92+
93+
3. After running `yarn docs:build` or `npm run docs:build`, deploy with the command `firebase deploy`.

0 commit comments

Comments
 (0)