You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/documentation.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,20 +48,22 @@ In order to build an MkDocs deployment or serve the documentation locally, we ne
48
48
49
49
## Updating MkDocs Deployment
50
50
51
-
If changes are made within `/docs`, the GitHub Pages deployment will need to be updated. Assuming you have already installed [MkDocs](https://www.mkdocs.org/getting-started/#installation) and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/getting-started/#installation), do the following:
51
+
### GitHub Action to Deploy Documentation
52
52
53
-
1. Navigate to the projects root directory.
53
+
A GitHub Action is set up to automatically deploy the documentation to GitHub Pages whenever a commit is made to the `main` branch. This action is triggered by a push event to the `main` branch and runs the `mkdocs gh-deploy` command to build and deploy the documentation.
54
54
55
-
2. Delete the existing `/mkdocs_deployment` directory.
55
+
### Manual Deployment
56
56
57
-
3. Build the MkDocs deployment.
57
+
If changes are made within `/docs`, the GitHub Pages deployment will need to be updated. Assuming you have already installed [MkDocs](https://www.mkdocs.org/getting-started/#installation) and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/getting-started/#installation), do the following:
58
58
59
-
```bash
60
-
mkdocs build
61
-
```
59
+
1. Navigate to the projects root directory.
62
60
63
-
4. Rename the `/site` directory to `/mkdocs_deployment`. This allows git to track the build so GitHub Pages can redeploy it.
61
+
2. Deploy the documentation to GitHub Pages.
62
+
63
+
```bash
64
+
mkdocs gh-deploy
65
+
```
64
66
65
-
5. Commit and Push changes.
67
+
3. This will build the documentation and deploy it to the `gh-pages` branch of your repository. The documentation will be available at `https://ONS-Innovation.github.io/<repository-name>/`.
66
68
67
-
Once completed, a GitHub Action will redeploy the new build to GitHub Pages.
69
+
**Please Note:** The `gh-deploy` command will overwrite the `gh-pages` branch and make the local changes available on GitHub Pages. Make sure that these changes are appropriate and have been reviewed before deployment.
0 commit comments