mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Adds concurrency documentation
This commit is contained in:
parent
db9290180a
commit
714df4415f
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
## Getting Started :airplane:
|
## Getting Started :airplane:
|
||||||
|
|
||||||
You can include the action in your workflow to trigger on any event that [GitHub actions supports](https://help.github.com/en/articles/events-that-trigger-workflows). If the remote branch that you wish to deploy to doesn't already exist the action will create it for you. Your workflow will also need to include the `actions/checkout` step before this workflow runs in order for the deployment to work.
|
You can include the action in your workflow to trigger on any event that [GitHub actions supports](https://help.github.com/en/articles/events-that-trigger-workflows). If the remote branch that you wish to deploy to doesn't already exist the action will create it for you. Your workflow will also need to include the `actions/checkout` step before this workflow runs in order for the deployment to work. If you intend to make multiple deployments in quick succession [you may need to levereage the concurrency parameter in your workflow](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency) to prevent overlaps with the Git process.
|
||||||
|
|
||||||
You can view an example of this below.
|
You can view an example of this below.
|
||||||
|
|
||||||
@ -61,6 +61,7 @@ name: Build and Deploy
|
|||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
|
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout 🛎️
|
- name: Checkout 🛎️
|
||||||
@ -208,6 +209,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
|
concurrency: ci-${{ github.ref }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout 🛎️
|
- name: Checkout 🛎️
|
||||||
@ -274,6 +276,7 @@ jobs:
|
|||||||
path: build
|
path: build
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
concurrency: ci-${{ github.ref }}
|
||||||
needs: [build] # The second job must depend on the first one to complete before running, and uses ubuntu-latest instead of windows.
|
needs: [build] # The second job must depend on the first one to complete before running, and uses ubuntu-latest instead of windows.
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -327,6 +330,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
|
concurrency: ci-${{ github.ref }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout 🛎️
|
- name: Checkout 🛎️
|
||||||
|
Loading…
Reference in New Issue
Block a user