mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-14 22:29:17 +08:00
add: mkdocs example
This commit is contained in:
parent
9bfcfe68ee
commit
f2d1faaacf
43
README.md
43
README.md
@ -69,6 +69,49 @@ action "deploy" {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
### MkDocs
|
||||||
|
|
||||||
|
- [peaceiris/actions-pipenv: GitHub Actions for pipenv](https://github.com/peaceiris/actions-pipenv)
|
||||||
|
- [main.workflow - peaceiris/mkdocs-material-boilerplate](https://github.com/peaceiris/mkdocs-material-boilerplate/blob/master/.github/main.workflow)
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
workflow "MkDocs workflow" {
|
||||||
|
on = "push"
|
||||||
|
resolves = ["deploy"]
|
||||||
|
}
|
||||||
|
|
||||||
|
action "branch-filter" {
|
||||||
|
uses = "actions/bin/filter@master"
|
||||||
|
args = "branch master"
|
||||||
|
}
|
||||||
|
|
||||||
|
action "pipenv-sync" {
|
||||||
|
needs = ["branch-filter"]
|
||||||
|
uses = "peaceiris/actions-pipenv@3.6"
|
||||||
|
args = "sync"
|
||||||
|
}
|
||||||
|
|
||||||
|
action "mkdocs-build" {
|
||||||
|
needs = ["pipenv-sync"]
|
||||||
|
uses = "peaceiris/actions-pipenv@3.6"
|
||||||
|
args = ["run", "mkdocs", "build", "--config-file", "./mkdocs-sample.yml"]
|
||||||
|
}
|
||||||
|
|
||||||
|
action "deploy" {
|
||||||
|
needs = ["mkdocs-build"]
|
||||||
|
uses = "peaceiris/actions-gh-pages@v1.0.0"
|
||||||
|
env = {
|
||||||
|
PUBLISH_DIR = "./site"
|
||||||
|
PUBLISH_BRANCH = "gh-pages"
|
||||||
|
}
|
||||||
|
secrets = ["ACTIONS_DEPLOY_KEY"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT License - peaceiris/actions-gh-pages]
|
[MIT License - peaceiris/actions-gh-pages]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user