docs: Add concurrency

This commit is contained in:
peaceiris 2021-07-12 02:22:39 +09:00
parent 497618ba62
commit 8d746f09e2
No known key found for this signature in database
GPG Key ID: 5868468A8EBA64EC

View File

@ -78,6 +78,9 @@ on:
- main # Set a branch to deploy - main # Set a branch to deploy
pull_request: pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
@ -90,7 +93,7 @@ jobs:
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
with: with:
hugo-version: '0.83.1' hugo-version: '0.85.0'
# extended: true # extended: true
- name: Build - name: Build
@ -120,7 +123,7 @@ Set `extended: true` to use a Hugo extended version.
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
with: with:
hugo-version: '0.83.1' hugo-version: '0.85.0'
extended: true extended: true
``` ```
@ -173,7 +176,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. Write a `HUGO_VERSION` to the `.env` file like the following and push it to a remote branch.
```sh ```sh
HUGO_VERSION=0.83.1 HUGO_VERSION=0.85.0
``` ```
Next, add a step to read a Hugo version from the `.env` file. Next, add a step to read a Hugo version from the `.env` file.
@ -241,6 +244,9 @@ on:
- main # Set a branch to deploy - main # Set a branch to deploy
pull_request: pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
@ -253,7 +259,7 @@ jobs:
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
with: with:
hugo-version: '0.83.1' hugo-version: '0.85.0'
extended: true extended: true
- name: Setup Node - name: Setup Node
@ -296,6 +302,9 @@ on:
- main # Set a branch to deploy - main # Set a branch to deploy
pull_request: pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
@ -308,7 +317,7 @@ jobs:
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
with: with:
hugo-version: '0.83.1' hugo-version: '0.85.0'
extended: true extended: true
- name: Setup Ruby - name: Setup Ruby
@ -346,6 +355,9 @@ on:
branches: branches:
- main - main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
@ -360,7 +372,7 @@ jobs:
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
with: with:
hugo-version: '0.83.1' hugo-version: '0.85.0'
``` ```
<div align="right"> <div align="right">