-
Notifications
You must be signed in to change notification settings - Fork 2
87 lines (79 loc) · 2.21 KB
/
scully.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Run Scully
on:
workflow_run:
workflows:
- "Build and Upload Artifacts"
types:
- completed
branches:
- main
workflow_dispatch:
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build Scully with Scan Routes
uses: ./.github/actions/build-scully
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
notion_api_key: ${{ secrets.NOTION_API_KEY }}
should_scan_routes: true
on-failure:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check files changed
uses: ./.github/actions/check-changed-files
id: check-files-changed
outputs:
should_build: ${{ steps.check-files-changed.outputs.is_scully_changed == 'true' }}
on-dispatch:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }}
steps:
- run: echo Dispatching
outputs:
is_dispatch: 'true'
upload:
runs-on: ubuntu-latest
needs: on-failure
if: ${{ needs.on-failure.outputs.should_build != 'true' }}
steps:
- name: Download Scully artifacts
continue-on-error: true
uses: dawidd6/action-download-artifact@v2
with:
name: ngvn-scully
workflow: scully.yml
path: ./dist
- name: Reupload
uses: actions/upload-artifact@v2
with:
name: ngvn-scully
path: |
./dist
build:
runs-on: ubuntu-latest
needs:
- on-failure
- on-dispatch
if: ${{ needs.on-failure.outputs.should_build == 'true' || needs.on-dispatch.outputs.is_dispatch == 'true' }}
steps:
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build Scully
uses: ./.github/actions/build-scully
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
notion_api_key: ${{ secrets.NOTION_API_KEY }}