-
Notifications
You must be signed in to change notification settings - Fork 39
44 lines (40 loc) · 1.42 KB
/
trigger-website.yaml
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
name: Trigger website build test
on:
pull_request:
branches:
- main
jobs:
airtable:
name: Airtable updates
runs-on: macOS-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Trigger test build
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GLOBAL_GHA_PAT }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'rladies',
repo: 'rladies.github.io',
workflow_id: 'build.yaml',
ref: 'main',
inputs: {
blogs: '${{ github.run_id }}',
triggering_issue: '${{ github.event.number }}',
triggering_repo: '${{ github.event.repository.name }}'
}
})
- name: Notify about build start
env:
GH_TOKEN: ${{ secrets.GLOBAL_GHA_TOKEN }}
run: |
issue_number=${{ github.event.number }}
owner="rladies"
repo="${{ github.event.repository.name }}"
comment_body="Building test-site now! The build will take a few minutes,
but you can track its progress in the [website repo](https://github.com/rladies/rladies.github.io/actions/workflows/build.yaml)."
echo "$comment_body" | gh issue comment $issue_number --repo $owner/$repo