From 196473973ff841e8169c27d3ba8f40d85dab8c79 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Thu, 15 Aug 2019 20:23:51 +0900 Subject: [PATCH] update: readme --- README.md | 52 ++++++++++++++++++++++++---------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index adf9235..57b0ff1 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ ## Getting started -### Create `main.workflow` +### Create `.github/workflows/push.yml` 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-gh-pages latest version](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg?label=peaceiris%2Factions-gh-pages) -```hcl -workflow "GitHub Pages" { - on = "push" - resolves = ["deploy"] -} +```yaml +name: Main workflow -action "is-branch-master" { - uses = "actions/bin/filter@master" - args = "branch master" -} +on: + push: + branches: + - master -action "build" { - needs = "is-branch-master" - uses = "peaceiris/actions-hugo@v0.57.0" - args = ["--gc", "--minify", "--cleanDestinationDir"] -} - -action "deploy" { - needs = "build" - uses = "peaceiris/actions-gh-pages@v1.1.0" - env = { - PUBLISH_DIR = "./public" - PUBLISH_BRANCH = "gh-pages" - } - secrets = ["GITHUB_TOKEN] -} +jobs: + build-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: build + uses: peaceiris/actions-hugo@v0.57.0 + with: + args: --gc --minify --cleanDestinationDir + - name: deploy + uses: peaceiris/actions-gh-pages@v1.1.0 + if: contains(github.ref, 'master') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_BRANCH: gh-pages + PUBLISH_DIR: ./public ``` ## 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 @@ -64,5 +62,3 @@ action "deploy" { ## About the author - [peaceiris's homepage](https://peaceiris.com/) - -peaceiris - Patreon