mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-12-02 12:10:04 +08:00
docs: Deployment guide for GitLab Pages (#274)
This commit is contained in:
parent
1b74ef31a9
commit
026530de10
@ -1,6 +1,6 @@
|
|||||||
# Deploy
|
# Deploy
|
||||||
|
|
||||||
Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pages or VPS.
|
Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pages, GitLab Pages or VPS.
|
||||||
|
|
||||||
## GitHub Pages
|
## GitHub Pages
|
||||||
|
|
||||||
@ -16,6 +16,27 @@ It is recommended that you save your files to the `./docs` subfolder of the `mas
|
|||||||
|
|
||||||
!> You can also save files in the root directory and select `master branch`.
|
!> You can also save files in the root directory and select `master branch`.
|
||||||
|
|
||||||
|
## GitLab Pages
|
||||||
|
|
||||||
|
If you are deploying your master branch, include `.gitlab-ci.yml` with the following script:
|
||||||
|
?> The `.public` workaround is so `cp` doesn't also copy `public/` to itself in an infinite loop.
|
||||||
|
|
||||||
|
``` YAML
|
||||||
|
pages:
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- mkdir .public
|
||||||
|
- cp -r * .public
|
||||||
|
- mv .public public
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- public
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
```
|
||||||
|
|
||||||
|
!> You can replace script with `- cp -r docs/. public`, if `./docs` is your Docsify subfolder.
|
||||||
|
|
||||||
## VPS
|
## VPS
|
||||||
|
|
||||||
Try following nginx config.
|
Try following nginx config.
|
||||||
|
Loading…
Reference in New Issue
Block a user