update: readme
This commit is contained in:
parent
706b8fd3b1
commit
196473973f
1 changed files with 24 additions and 28 deletions
52
README.md
52
README.md
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
### Create `main.workflow`
|
### Create `.github/workflows/push.yml`
|
||||||
|
|
||||||
An example with [GitHub Actions for deploying to GitHub Pages with Static Site Generators]
|
An example with [GitHub Actions for deploying to GitHub Pages with Static Site Generators]
|
||||||
|
|
||||||
|
|
@ -23,39 +23,37 @@ An example with [GitHub Actions for deploying to GitHub Pages with Static Site G
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
```hcl
|
```yaml
|
||||||
workflow "GitHub Pages" {
|
name: Main workflow
|
||||||
on = "push"
|
|
||||||
resolves = ["deploy"]
|
|
||||||
}
|
|
||||||
|
|
||||||
action "is-branch-master" {
|
on:
|
||||||
uses = "actions/bin/filter@master"
|
push:
|
||||||
args = "branch master"
|
branches:
|
||||||
}
|
- master
|
||||||
|
|
||||||
action "build" {
|
jobs:
|
||||||
needs = "is-branch-master"
|
build-deploy:
|
||||||
uses = "peaceiris/actions-hugo@v0.57.0"
|
runs-on: ubuntu-latest
|
||||||
args = ["--gc", "--minify", "--cleanDestinationDir"]
|
steps:
|
||||||
}
|
- uses: actions/checkout@master
|
||||||
|
- name: build
|
||||||
action "deploy" {
|
uses: peaceiris/actions-hugo@v0.57.0
|
||||||
needs = "build"
|
with:
|
||||||
uses = "peaceiris/actions-gh-pages@v1.1.0"
|
args: --gc --minify --cleanDestinationDir
|
||||||
env = {
|
- name: deploy
|
||||||
PUBLISH_DIR = "./public"
|
uses: peaceiris/actions-gh-pages@v1.1.0
|
||||||
PUBLISH_BRANCH = "gh-pages"
|
if: contains(github.ref, 'master')
|
||||||
}
|
env:
|
||||||
secrets = ["GITHUB_TOKEN]
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
}
|
PUBLISH_BRANCH: gh-pages
|
||||||
|
PUBLISH_DIR: ./public
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT License - peaceiris/actions-hugo]
|
- [MIT License - peaceiris/actions-hugo]
|
||||||
|
|
||||||
[MIT License - peaceiris/actions-hugo]: https://github.com/peaceiris/actions-hugo/blob/master/LICENSE
|
[MIT License - peaceiris/actions-hugo]: https://github.com/peaceiris/actions-hugo/blob/master/LICENSE
|
||||||
|
|
||||||
|
|
@ -64,5 +62,3 @@ action "deploy" {
|
||||||
## About the author
|
## About the author
|
||||||
|
|
||||||
- [peaceiris's homepage](https://peaceiris.com/)
|
- [peaceiris's homepage](https://peaceiris.com/)
|
||||||
|
|
||||||
<a href="https://www.patreon.com/peaceiris"><img src="./images/patreon.jpg" alt="peaceiris - Patreon" width="150px"></a>
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue