Skip to content

Commit f8f22e5

Browse files
authored
docs: add netlify (#542)
1 parent ee72dd0 commit f8f22e5

File tree

3 files changed

+31
-19
lines changed

3 files changed

+31
-19
lines changed

docs/de-de/deploy.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,23 @@
66

77
Du kannst folgende drei Orte verwenden, um die Dokumentation für dein Github repository zu verwalten:
88

9-
* `docs/` Ordner
10-
* master branch
11-
* gh-pages branch
9+
- `docs/` Ordner
10+
- master branch
11+
- gh-pages branch
1212

1313
Es wird empfohlen, deine Dateien im `./docs` Unterordner im `master` branch deines repository zu speichern. Wechsle dann zu den Einstellungen deines repository und wähle `master branch /docs folder` als deine Github Pages Quelle.
1414

1515
![github pages](../_images/deploy-github-pages.png)
1616

1717
!> Du kannst die Dateien auch im Hauptverzeichnis speichern und dann `master branch` in den Einstellungen auswählen.
1818

19-
2019
## GitLab Pages
2120

2221
If you are deploying your master branch, include `.gitlab-ci.yml` with the following script:
2322

2423
?> The `.public` workaround is so `cp` doesn't also copy `public/` to itself in an infinite loop.
2524

26-
``` YAML
25+
```YAML
2726
pages:
2827
stage: deploy
2928
script:
@@ -39,7 +38,6 @@ pages:
3938
4039
!> You can replace script with `- cp -r docs/. public`, if `./docs` is your Docsify subfolder.
4140

42-
4341
## VPS
4442

4543
Verwende folgende nginx config.
@@ -55,3 +53,9 @@ server {
5553
}
5654
}
5755
```
56+
57+
## Netlify
58+
59+
1. Login to your [Netlify](https://www.netlify.com/) account.
60+
2. In the [dashboard](https://app.netlify.com/) page, click New site from Git.
61+
3. Choose a repository where you store your docs, leave the Build Command area blank, fill in the Publish directory area with the directory of your `index.html`, for example it should be docs if you populated it at `docs/index.html`.

docs/deploy.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pa
66

77
There're three places to populate your docs for your Github repository:
88

9-
* `docs/` folder
10-
* master branch
11-
* gh-pages branch
9+
- `docs/` folder
10+
- master branch
11+
- gh-pages branch
1212

1313
It is recommended that you save your files to the `./docs` subfolder of the `master` branch of your repository. Then select `master branch /docs folder` as your Github Pages source in your repositories' settings page.
1414

@@ -23,7 +23,7 @@ If you are deploying your master branch, include `.gitlab-ci.yml` with the follo
2323

2424
?> The `.public` workaround is so `cp` doesn't also copy `public/` to itself in an infinite loop.
2525

26-
``` YAML
26+
```YAML
2727
pages:
2828
stage: deploy
2929
script:
@@ -41,20 +41,17 @@ pages:
4141

4242
## Firebase Hosting
4343

44-
!> You'll need to install the Firebase CLI using `npm i -g firebase-tools` after signing into the [Firebase Console](https://console.firebase.google.com) using a Google Account.
44+
!> You'll need to install the Firebase CLI using `npm i -g firebase-tools` after signing into the [Firebase Console](https://console.firebase.google.com) using a Google Account.
4545

4646
Using Terminal determine and navigate to the directory for your Firebase Project - this could be `~/Projects/Docs` etc. From there, run `firebase init`, choosing `Hosting` from the menu (use **space** to select, **arrow keys** to change options and **enter** to confirm). Follow the setup instructions.
4747

4848
You should have your `firebase.json` file looking similar to this (I changed the deployment directory from `public` to `site`):
49+
4950
```json
5051
{
5152
"hosting": {
5253
"public": "site",
53-
"ignore": [
54-
"firebase.json",
55-
"**/.*",
56-
"**/node_modules/**"
57-
]
54+
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
5855
}
5956
}
6057
```
@@ -76,3 +73,9 @@ server {
7673
}
7774
}
7875
```
76+
77+
## Netlify
78+
79+
1. Login to your [Netlify](https://www.netlify.com/) account.
80+
2. In the [dashboard](https://app.netlify.com/) page, click New site from Git.
81+
3. Choose a repository where you store your docs, leave the Build Command area blank, fill in the Publish directory area with the directory of your `index.html`, for example it should be docs if you populated it at `docs/index.html`.

docs/zh-cn/deploy.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
## GitHub Pages
66

77
GitHub Pages 支持从三个地方读取文件
8+
89
- `docs/` 目录
910
- master 分支
1011
- gh-pages 分支
@@ -15,14 +16,13 @@ GitHub Pages 支持从三个地方读取文件
1516

1617
!> 可以将文档放在根目录下,然后选择 **master 分支** 作为文档目录。
1718

18-
1919
## GitLab Pages
2020

2121
如果你正在部署你的主分支, 在 `.gitlab-ci.yml` 中包含以下脚本:
2222

2323
?> `.public` 的解决方法是这样的,`cp` 不会无限循环的将 `public/` 复制到自身。
2424

25-
``` YAML
25+
```YAML
2626
pages:
2727
stage: deploy
2828
script:
@@ -38,7 +38,6 @@ pages:
3838
3939
!> 你可以用 `- cp -r docs/. public` 替换脚本, 如果 `./docs` 是你的 docsify 子文件夹。
4040

41-
4241
## VPS
4342

4443
和部署所有静态网站一样,只需将服务器的访问根目录设定为 `index.html` 文件。
@@ -56,3 +55,9 @@ server {
5655
}
5756
}
5857
```
58+
59+
## Netlify
60+
61+
1. Login to your [Netlify](https://www.netlify.com/) account.
62+
2. In the [dashboard](https://app.netlify.com/) page, click New site from Git.
63+
3. Choose a repository where you store your docs, leave the Build Command area blank, fill in the Publish directory area with the directory of your `index.html`, for example it should be docs if you populated it at `docs/index.html`.

0 commit comments

Comments
 (0)