Skip to content

Commit c019613

Browse files
committed
Update README.md
Signed-off-by: OPSEC McCann <[email protected]>
1 parent f271eb5 commit c019613

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,47 @@ There are two methods for generating and building your `gh-pages` branch: use ei
1010

1111
### Building with `PERSONAL_TOKEN`
1212

13-
[Generate a personal access token (scope `repo`)](https://github.com/settings/tokens) and [create a secret](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) in your repository settings with the name `PERSONAL_TOKEN` and the value of the token generated.
13+
- [Generate a personal access token (scope `repo`)](https://github.com/settings/tokens) and [create a secret](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) in your repository settings with the name `PERSONAL_TOKEN` and the value of the token generated.
1414

15-
Note that this is an account-level token that has access to update **any** repo owned by you, so be sure to avoid sharing it.
15+
- Note that this is an account-level token that has access to update **any** repo owned by you, so be sure to avoid sharing it.
1616

1717
### Building with `GITHUB_TOKEN`
1818

19-
This action supports building and deploying with a `GITHUB_TOKEN`. This token is automatically generated by Github Actions when a workflow runs so it is convenient.
19+
- This action supports building and deploying with a `GITHUB_TOKEN`. This token is automatically generated by Github Actions when a workflow runs so it is convenient.
2020

21-
It is more **secure** than a personal token, since you never actually see the value of the `GITHUB_TOKEN` and also the `GITHUB_TOKEN` is scoped to only work for a **single** repo.
21+
- It is more **secure** than a personal token, since you never actually see the value of the `GITHUB_TOKEN` and also the `GITHUB_TOKEN` is scoped to only work for a **single** repo.
2222

23-
You may need to give the `GITHUB_TOKEN` write permission. Go to your repository's **Settings > Actions > General > Workflow Permissions** and select **Read and write permissions**.
23+
- You may need to give the `GITHUB_TOKEN` write permission. Go to your repository's **Settings > Actions > General > Workflow Permissions** and select **Read and write permissions**.
2424

25-
Note that for this approach, Github Pages will be enabled in Settings but you will _not_ have a URL displayed or environment tab yet. So change the Github Pages settings to another target and then back again to `gh-pages` (if that is your branch to serve) - then you will see a URL. This step is only needed on the _first_ deploy and no action is needed later on.
25+
- Note that for this approach, Github Pages will be enabled in Settings but you will _not_ have a URL displayed or environment tab yet. So change the Github Pages settings to another target and then back again to `gh-pages` (if that is your branch to serve) - then you will see a URL. This step is only needed on the _first_ deploy and no action is needed later on.
2626

2727
### Alternative `GITHUB_DOMAIN`
2828

29-
In case this action should be used in a Github Enterprise environment you can overwrite the `github.com` domain with your corresponding Github Enterprise domain name by specifying the `GITHUB_DOMAIN` environment variable.
29+
- In case this action should be used in a Github Enterprise environment you can overwrite the `github.com` domain with your corresponding Github Enterprise domain name by specifying the `GITHUB_DOMAIN` environment variable.
3030

31-
### Custom domain for github pages
31+
### Building with `CUSTOM_DOMAIN` for Github Pages
3232

33-
MkDocs can be deployed to github pages using a custom domain, if you populate a `CUSTOM_DOMAIN` environment variable. This will generate a CNAME file, which will be placed inside the `/docs` folder.
33+
- MkDocs can be deployed to github pages using a custom domain, if you populate a `CUSTOM_DOMAIN` environment variable. This will generate a CNAME file, which by default will be placed inside the `/docs` folder.
34+
- Using the ``CUSTOM_DOCS`` environment variable will change this folder, and should match the ``docs_dir`` in your ``mkdocs.yml``file.
3435

3536
https://www.mkdocs.org/user-guide/deploying-your-docs/#custom-domains
3637

3738
### Custom File Pathing of Mkdocs file
3839

39-
This action supports deployment of mkdocs with different file path , if you populate a `CONFIG_FILE` environment variable. This is important if you have mkdocs file in another folder such as if you have `mkdocs.yml` in a path `docs/mkdocs.yml`. Without populating this, the deployment assumes that `mkdocs.yml` is on the root folder.
40+
- This action supports deployment of mkdocs with different file path , if you populate a `CONFIG_FILE` environment variable. This is important if you have mkdocs file in another folder such as if you have `mkdocs.yml` in a path `docs/mkdocs.yml`. Without populating this, the deployment assumes that `mkdocs.yml` is on the root folder.
4041

4142
## Installing extra packages
4243

43-
Some Python packages require C bindings. These packages can be installed using the `EXTRA_PACKAGES` variable. The `EXTRA_PACKAGES` variable will be passed to the `apk add` command of Alpine Linux before running `pip install` to install the Python packages.
44+
- Some Python packages require C bindings. These packages can be installed using the `EXTRA_PACKAGES` variable. The `EXTRA_PACKAGES` variable will be passed to the `apk add` command of Alpine Linux before running `pip install` to install the Python packages.
4445

4546
## Installing mkdocs plugins
4647

47-
If you use some mkdocs plugins like [`codeinclude`](https://github.com/rnorth/mkdocs-codeinclude-plugin) then you need to define it as dependency in the typical python way with a `requirements.txt` file. In the sample above you need to add the line `mkdocs-codeinclude-plugin`. Then you need to link the file using the `REQUIREMENTS` variable.
48+
- If you use some mkdocs plugins like [`codeinclude`](https://github.com/rnorth/mkdocs-codeinclude-plugin) then you need to define it as dependency in the typical python way with a `requirements.txt` file. In the sample above you need to add the line `mkdocs-codeinclude-plugin`. Then you need to link the file using the `REQUIREMENTS` variable.
4849

4950
## Example usage
5051

51-
```shell
52-
name: Publish docs via GitHub Pages
52+
```yml
53+
name: Publish Docs via GitHub Pages
5354
on:
5455
push:
5556
branches:
@@ -69,6 +70,7 @@ jobs:
6970
env:
7071
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7172
CUSTOM_DOMAIN: optionaldomain.com
73+
CUSTOM_DOCS: coolfolder # Only used if CUSTOM_DOMAIN and a custom 'docs_dir' are set
7274
CONFIG_FILE: folder/mkdocs.yml
7375
EXTRA_PACKAGES: build-base
7476
# GITHUB_DOMAIN: github.myenterprise.com

0 commit comments

Comments
 (0)