feat: Update pages

This commit is contained in:
Michael Currin
2020-05-02 23:17:36 +02:00
parent 4f2c416522
commit 29f21df22c
3 changed files with 31 additions and 11 deletions
+21 -3
View File
@@ -1,22 +1,31 @@
# Deploy
> How to deploy a MkDocs site
> How to deploy a MkDocs site to be served publically
See [Deploying Your Docs](https://www.mkdocs.org/user-guide/deploying-your-docs/) on the Mkdocs site for more details.
## Github Pages
> How to deploy your docs site to Github Pages.
_Note this is for a Project Page and not Organization and User Pages._
How to deploy to Github Pages.
Run this to build to `site` directory, push to `gh-pages` branch and enable Github Pages (if it was not yet enabled). The default option is to clean the site directory first.
### Run deploy command
Run this command locally:
```sh
mkdocs gh-deploy
```
That will do the following:
1. Clean and build to `site` directory.
2. Push to `gh-pages` branch. Note: You must not edit this branch directly.
3. Enable Github Pages if it was not yet enabled
Then go to your repo on Github, see the *environment* tab and click _View deployment_.
e.g.
@@ -29,3 +38,12 @@ See deploy options:
```sh
mkdocs gh-deploy --help
```
### Remote build
> How to trigger a rebuild of your docs site on changes
When you make changes to your docs config or the docs directory, especially editing on Github directly, it's often useful to have the docs site build and deploy without you running a command. A remote build also means you not need to setup Python or MkDocs on your local machine just to get the docs site to work.
So setup a Github Action such as this to your project.
- [deploy-mkdocs](https://github.com/marketplace/actions/deploy-mkdocs) action in marketplace.