mirror of
https://github.com/status-im/actions-hugo.git
synced 2025-02-03 08:23:31 +00:00
add: link to GitHub Actions for deploying to GitHub Pages with Static Site Generators
This commit is contained in:
parent
c813462c35
commit
ef0630bb4c
26
README.md
26
README.md
@ -16,16 +16,36 @@
|
|||||||
|
|
||||||
### Create `main.workflow`
|
### 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
|
```hcl
|
||||||
workflow "Main workflow" {
|
workflow "GitHub Pages" {
|
||||||
on = "push"
|
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"
|
uses = "peaceiris/actions-hugo@v0.55.6"
|
||||||
args = ["--gc", "--minify", "--cleanDestinationDir"]
|
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"]
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user