update: readme

This commit is contained in:
peaceiris 2019-08-15 20:23:51 +09:00
parent 706b8fd3b1
commit 196473973f

View file

@ -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
![peaceiris/actions-hugo latest version](https://img.shields.io/github/release/peaceiris/actions-hugo.svg?label=peaceiris%2Factions-hugo) ![peaceiris/actions-hugo latest version](https://img.shields.io/github/release/peaceiris/actions-hugo.svg?label=peaceiris%2Factions-hugo)
![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages) ![peaceiris/actions-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages)
```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>