Skip to content

Commit 2de4953

Browse files
committed
ci: add sequence autofix->test->deploy/docsdeploy
1 parent e46cdb4 commit 2de4953

3 files changed

Lines changed: 15 additions & 20 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
name: deploy
44

55
on:
6+
workflow_run:
7+
workflows: ['test']
8+
types:
9+
- completed
610
workflow_dispatch:
711
inputs:
812
github_sha:
@@ -38,6 +42,7 @@ concurrency:
3842
jobs:
3943
# This workflow contains a single job called "build"
4044
deploy:
45+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
4146
# The type of runner that the job will run on
4247
runs-on: ubuntu-latest
4348

.github/workflows/docs-deploy.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,10 @@ name: docs-deploy
44

55
# Controls when the workflow will run
66
on:
7-
# Triggers the workflow on push or pull request events but only for the main branch
8-
push:
9-
branches:
10-
- main
11-
paths:
12-
- 'docs/**'
13-
- '.github/workflows/docs-deploy.yml'
14-
15-
# Allows you to run this workflow manually from the Actions tab
7+
workflow_run:
8+
workflows: ['test']
9+
types:
10+
- completed
1611
workflow_dispatch:
1712

1813
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
@@ -25,6 +20,7 @@ concurrency:
2520
jobs:
2621
# This workflow contains a single job called "deploy"
2722
docs-deploy:
23+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
2824
# The type of runner that the job will run on
2925
runs-on: ubuntu-latest
3026

.github/workflows/test.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
name: test
22

33
on:
4-
push:
5-
branches-ignore:
6-
- docs
7-
- analysis
8-
- models
9-
paths-ignore: # ignore any changes to the docs for this workflow or unimportant files
10-
- 'docs/**'
11-
- '.github/workflows/docs-deploy.yml'
12-
- 'LICENSE'
13-
- '**/*.md'
14-
pull_request: [main]
4+
workflow_run:
5+
workflows: ['autofix.ci']
6+
types:
7+
- completed
158
workflow_dispatch:
169

1710
jobs:
1811
test:
12+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
1913
runs-on: ubuntu-latest
2014

2115
env:

0 commit comments

Comments
 (0)