add: link to GitHub Actions for deploying to GitHub Pages with Static Site Generators

This commit is contained in:
peaceiris 2019-05-22 07:18:16 +09:00
parent c813462c35
commit ef0630bb4c

View File

@ -16,16 +16,36 @@
### Create `main.workflow`
An example with [GitHub Actions for deploying to GitHub Pages with Static Site Generators]
[GitHub Actions for deploying to GitHub Pages with Static Site Generators]: https://github.com/peaceiris/actions-gh-pages
```hcl
workflow "Main workflow" {
workflow "GitHub Pages" {
on = "push"
resolves = ["hugo"]
resolves = ["deploy"]
}
action "hugo" {
action "is-branch-master" {
uses = "actions/bin/filter@master"
args = "branch master"
}
action "build" {
needs = "is-branch-master"
uses = "peaceiris/actions-hugo@v0.55.6"
args = ["--gc", "--minify", "--cleanDestinationDir"]
}
action "deploy" {
needs = "build"
uses = "peaceiris/actions-gh-pages@v1.0.0"
env = {
PUBLISH_DIR = "./public"
PUBLISH_BRANCH = "gh-pages"
}
secrets = ["ACTIONS_DEPLOY_KEY"]
}
```