From 2018fa399b0fe774da81619e3de1acf6c73f6a82 Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Tue, 8 Jun 2021 18:25:31 +0200 Subject: [PATCH] docs: update deploy.md --- docs/docs/tutorial/deploy.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/docs/tutorial/deploy.md b/docs/docs/tutorial/deploy.md index 6358249..5932881 100644 --- a/docs/docs/tutorial/deploy.md +++ b/docs/docs/tutorial/deploy.md @@ -29,13 +29,13 @@ $ make d That will use `Makefile` to run the following: ```sh -$ mkdocs gh-deploy --strict +$ mkdocs gh-deploy --strict --force ``` 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. +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, look at the *environment* tab and click _View deployment_. @@ -56,3 +56,11 @@ $ mkdocs gh-deploy --help 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 automatically in a remote environment. This is provided for free by GitHub. See the [docs.yml](https://github.com/MichaelCurrin/mkdocs-quickstart/blob/master/.github/workflows/docs.yml) workflow provided with this project. You don't have to change anything there. The token will be generated for you by GitHub Actions. + +### Mixing deploy approaches + +Warning - even though using the `--force` flag to force push, I _still_ got an error on the CI that I need to pull in changes first. This failing state was _caused_ by doing manual local deploy. + +Deleting the branch and rerunning the CI fixed it. + +But otherwise, avoid mixing the deploy command locally and other times doing it with CI. Maybe MkDocs needs to make a fix on the force flag.