-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* migrate: GitHub Actions beta v2 (HCL to YAML) * add: Pull Request template * upgrade: actions * enhance: GitHub Actions config * update: readme * remove: patreon image
- Loading branch information
Showing
6 changed files
with
43 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- [ ] upgrade: hugo to `v0..` | ||
- [ ] update: tag on readme | ||
- [ ] release: `v0..` with **master** branch |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Push workflow | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Docker build | ||
run: docker build -t peaceiris/actions-hugo . | ||
- name: Check Hugo version | ||
run: docker run peaceiris/actions-hugo:latest version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"] | ||
} | ||
action "is-branch-master" { | ||
uses = "actions/bin/filter@master" | ||
args = "branch master" | ||
} | ||
action "build" { | ||
needs = "is-branch-master" | ||
uses = "peaceiris/[email protected]" | ||
args = ["--gc", "--minify", "--cleanDestinationDir"] | ||
} | ||
action "deploy" { | ||
needs = "build" | ||
uses = "peaceiris/[email protected]" | ||
env = { | ||
PUBLISH_DIR = "./public" | ||
PUBLISH_BRANCH = "gh-pages" | ||
} | ||
secrets = ["ACTIONS_DEPLOY_KEY"] | ||
} | ||
```yaml | ||
name: Main workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: build | ||
uses: peaceiris/[email protected] | ||
with: | ||
args: --gc --minify --cleanDestinationDir | ||
- name: deploy | ||
uses: peaceiris/[email protected] | ||
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/) | ||
|
||
<a href="https://www.patreon.com/peaceiris"><img src="./images/patreon.jpg" alt="peaceiris - Patreon" width="150px"></a> |
Binary file not shown.