generated from ryanwelcher/wordpress-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add concurrency so only one deploy can run at a time. Check for linti…
…ng failure before running the deploy on staging.
- Loading branch information
1 parent
e07047b
commit ab21872
Showing
2 changed files
with
9 additions
and
4 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
name: Deploy plugin to Production | ||
|
||
concurrency: production | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_run: | ||
|
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
name: Deploy plugin to Staging | ||
|
||
concurrency: staging | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
Linting: | ||
uses: ./.github/workflows/linting.yml | ||
concurrency: | ||
group: staging-deploy | ||
cancel-in-progress: true | ||
|
||
|
||
Deploy: | ||
name: FTP-Deploy-Action | ||
|
@@ -20,7 +19,11 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- name: Linting | ||
id: linting | ||
uses: ./.github/workflows/linting.yml | ||
- name: FTP-Deploy-Action | ||
if: steps.linting.outcome == 'success' | ||
uses: Automattic/[email protected] | ||
with: | ||
ftp-server: sftp://sftp.wp.com/htdocs/wp-content/plugins/custom-plugin/ | ||
|