Skip to content

Commit e768c16

Browse files
committed
chore: remove code block indent
1 parent 15722c5 commit e768c16

File tree

12 files changed

+604
-598
lines changed

12 files changed

+604
-598
lines changed

docs/guide/deployment.md

Lines changed: 115 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -27,64 +27,64 @@ The following guides are based on some shared assumptions:
2727

2828
Create `.github/workflows/docs.yml` to set up the workflow.
2929

30-
:::details Click to expand sample config
31-
```yaml
32-
name: docs
33-
34-
on:
35-
# trigger deployment on every push to main branch
36-
push:
37-
branches: [main]
38-
# trigger deployment manually
39-
workflow_dispatch:
40-
41-
jobs:
42-
docs:
43-
runs-on: ubuntu-latest
44-
45-
steps:
46-
- uses: actions/checkout@v2
47-
with:
48-
# fetch all commits to get last updated time or other git log info
49-
fetch-depth: 0
50-
51-
- name: Setup Node.js
52-
uses: actions/setup-node@v1
53-
with:
54-
# choose node.js version to use
55-
node-version: '14'
56-
57-
# cache node_modules
58-
- name: Cache dependencies
59-
uses: actions/cache@v2
60-
id: yarn-cache
61-
with:
62-
path: |
63-
**/node_modules
64-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
65-
restore-keys: |
66-
${{ runner.os }}-yarn-
67-
68-
# install dependencies if the cache did not hit
69-
- name: Install dependencies
70-
if: steps.yarn-cache.outputs.cache-hit != 'true'
71-
run: yarn --frozen-lockfile
72-
73-
# run build script
74-
- name: Build VuePress site
75-
run: yarn docs:build
76-
77-
# please check out the docs of the workflow for more details
78-
# @see https://github.com/crazy-max/ghaction-github-pages
79-
- name: Deploy to GitHub Pages
80-
uses: crazy-max/ghaction-github-pages@v2
81-
with:
82-
# deploy to gh-pages branch
83-
target_branch: gh-pages
84-
# deploy the default output dir of VuePress
85-
build_dir: docs/.vuepress/dist
86-
```
87-
:::
30+
:::details Click to expand sample config
31+
```yaml
32+
name: docs
33+
34+
on:
35+
# trigger deployment on every push to main branch
36+
push:
37+
branches: [main]
38+
# trigger deployment manually
39+
workflow_dispatch:
40+
41+
jobs:
42+
docs:
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- uses: actions/checkout@v2
47+
with:
48+
# fetch all commits to get last updated time or other git log info
49+
fetch-depth: 0
50+
51+
- name: Setup Node.js
52+
uses: actions/setup-node@v1
53+
with:
54+
# choose node.js version to use
55+
node-version: '14'
56+
57+
# cache node_modules
58+
- name: Cache dependencies
59+
uses: actions/cache@v2
60+
id: yarn-cache
61+
with:
62+
path: |
63+
**/node_modules
64+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
65+
restore-keys: |
66+
${{ runner.os }}-yarn-
67+
68+
# install dependencies if the cache did not hit
69+
- name: Install dependencies
70+
if: steps.yarn-cache.outputs.cache-hit != 'true'
71+
run: yarn --frozen-lockfile
72+
73+
# run build script
74+
- name: Build VuePress site
75+
run: yarn docs:build
76+
77+
# please check out the docs of the workflow for more details
78+
# @see https://github.com/crazy-max/ghaction-github-pages
79+
- name: Deploy to GitHub Pages
80+
uses: crazy-max/ghaction-github-pages@v2
81+
with:
82+
# deploy to gh-pages branch
83+
target_branch: gh-pages
84+
# deploy the default output dir of VuePress
85+
build_dir: docs/.vuepress/dist
86+
```
87+
:::
8888
8989
:::tip
9090
Please refer to [GitHub Pages official guide](https://pages.github.com/) for more details.
@@ -94,37 +94,37 @@ Please refer to [GitHub Pages official guide](https://pages.github.com/) for mor
9494
9595
1. Set the correct [base](../reference/config.md#base) config.
9696
97-
If you are deploying to `https://<USERNAME>.gitlab.io/`, you can omit `base` as it defaults to `"/"`.
97+
If you are deploying to `https://<USERNAME>.gitlab.io/`, you can omit `base` as it defaults to `"/"`.
9898

99-
If you are deploying to `https://<USERNAME>.gitlab.io/<REPO>/`, for example your repository is at `https://gitlab.com/<USERNAME>/<REPO>`, then set `base` to `"/<REPO>/"`.
99+
If you are deploying to `https://<USERNAME>.gitlab.io/<REPO>/`, for example your repository is at `https://gitlab.com/<USERNAME>/<REPO>`, then set `base` to `"/<REPO>/"`.
100100

101101
2. Create `.gitlab-ci.yml` to set up [GitLab CI](https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/) workflow.
102102

103-
:::details Click to expand sample config
104-
```yaml
105-
# choose a docker image to use
106-
image: node:14-buster
107-
108-
pages:
109-
# trigger deployment on every push to main branch
110-
only:
111-
- main
112-
113-
# cache node_modules
114-
cache:
115-
paths:
116-
- node_modules/
117-
118-
# install dependencies and run build script
119-
script:
120-
- yarn --frozen-lockfile
121-
- yarn docs:build --dest public
122-
123-
artifacts:
124-
paths:
125-
- public
126-
```
127-
:::
103+
:::details Click to expand sample config
104+
```yaml
105+
# choose a docker image to use
106+
image: node:14-buster
107+
108+
pages:
109+
# trigger deployment on every push to main branch
110+
only:
111+
- main
112+
113+
# cache node_modules
114+
cache:
115+
paths:
116+
- node_modules/
117+
118+
# install dependencies and run build script
119+
script:
120+
- yarn --frozen-lockfile
121+
- yarn docs:build --dest public
122+
123+
artifacts:
124+
paths:
125+
- public
126+
```
127+
:::
128128

129129
:::tip
130130
Please refer to [GitLab Pages official guide](https://docs.gitlab.com/ce/user/project/pages/#getting-started) for more details.
@@ -136,24 +136,26 @@ Please refer to [GitLab Pages official guide](https://docs.gitlab.com/ce/user/pr
136136

137137
2. Create `firebase.json` and `.firebaserc` at the root of your project with the following content:
138138

139-
`firebase.json`:
140-
```json
141-
{
142-
"hosting": {
143-
"public": "./docs/.vuepress/dist",
144-
"ignore": []
145-
}
146-
}
147-
```
148-
149-
`.firebaserc`:
150-
```json
151-
{
152-
"projects": {
153-
"default": "<YOUR_FIREBASE_ID>"
154-
}
155-
}
156-
```
139+
`firebase.json`:
140+
141+
```json
142+
{
143+
"hosting": {
144+
"public": "./docs/.vuepress/dist",
145+
"ignore": []
146+
}
147+
}
148+
```
149+
150+
`.firebaserc`:
151+
152+
```json
153+
{
154+
"projects": {
155+
"default": "<YOUR_FIREBASE_ID>"
156+
}
157+
}
158+
```
157159

158160
3. After running `yarn docs:build`, deploy using the command `firebase deploy`.
159161

@@ -169,18 +171,19 @@ Please refer to [Firebase CLI official guide](https://firebase.google.com/docs/c
169171

170172
3. Run `heroku login` and fill in your Heroku credentials:
171173

172-
```bash
173-
heroku login
174-
```
174+
```bash
175+
heroku login
176+
```
175177

176178
4. Create a file called `static.json` in the root of your project with the below content:
177179

178-
`static.json`:
179-
```json
180-
{
181-
"root": "./docs/.vuepress/dist"
182-
}
183-
```
180+
`static.json`:
181+
182+
```json
183+
{
184+
"root": "./docs/.vuepress/dist"
185+
}
186+
```
184187

185188
This is the configuration of your site; read more at [heroku-buildpack-static](https://github.com/heroku/heroku-buildpack-static).
186189

0 commit comments

Comments
 (0)