enhance: yaml example
This commit is contained in:
parent
55565fc0f6
commit
a2e4fdca67
|
@ -25,7 +25,7 @@ An example with [GitHub Actions for deploying to GitHub Pages with Static Site G
|
||||||
![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)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: Main workflow
|
name: github-pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -34,16 +34,17 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-deploy:
|
build-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- name: build
|
- name: build
|
||||||
uses: peaceiris/actions-hugo@v0.57.2
|
uses: peaceiris/actions-hugo@v0.57.2
|
||||||
|
if: github.event.deleted == false
|
||||||
with:
|
with:
|
||||||
args: --gc --minify --cleanDestinationDir
|
args: --gc --minify --cleanDestinationDir
|
||||||
- name: deploy
|
- name: deploy
|
||||||
uses: peaceiris/actions-gh-pages@v1.1.0
|
uses: peaceiris/actions-gh-pages@v1.1.0
|
||||||
if: contains(github.ref, 'master')
|
if: success()
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PUBLISH_BRANCH: gh-pages
|
PUBLISH_BRANCH: gh-pages
|
||||||
|
|
Loading…
Reference in New Issue