Skip to content

Commit

Permalink
docs: Add pull_request event
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed May 17, 2021
1 parent b843eae commit 65bdbf1
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ on:
push:
branches:
- main # Set a branch to deploy
pull_request:

jobs:
deploy:
Expand All @@ -89,14 +90,15 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.81.0'
hugo-version: '0.83.1'
# extended: true

- name: Build
run: hugo --minify

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
Expand All @@ -118,7 +120,7 @@ Set `extended: true` to use a Hugo extended version.
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.81.0'
hugo-version: '0.83.1'
extended: true
```

Expand Down Expand Up @@ -171,7 +173,7 @@ How to sync a Hugo version between a Docker Compose and a GitHub Actions workflo
Write a `HUGO_VERSION` to the `.env` file like the following and push it to a remote branch.

```sh
HUGO_VERSION=0.81.0
HUGO_VERSION=0.83.1
```

Next, add a step to read a Hugo version from the `.env` file.
Expand Down Expand Up @@ -237,6 +239,7 @@ on:
push:
branches:
- main # Set a branch to deploy
pull_request:
jobs:
deploy:
Expand All @@ -250,13 +253,13 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.81.0'
hugo-version: '0.83.1'
extended: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '12.x'
node-version: '14'
- name: Cache dependencies
uses: actions/cache@v1
Expand All @@ -271,6 +274,7 @@ jobs:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -290,6 +294,7 @@ on:
push:
branches:
- main # Set a branch to deploy
pull_request:
jobs:
deploy:
Expand All @@ -303,7 +308,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.81.0'
hugo-version: '0.83.1'
extended: true
- name: Setup Ruby
Expand All @@ -320,6 +325,7 @@ jobs:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
```
Expand Down Expand Up @@ -354,7 +360,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.81.0'
hugo-version: '0.83.1'
```

<div align="right">
Expand Down

0 comments on commit 65bdbf1

Please sign in to comment.