Skip to content

Commit

Permalink
add website trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
drmowinckels committed Jan 29, 2024
1 parent 21f3ede commit 087a728
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/trigger-website.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Airtable updates

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: '${{ steps.make-pr.outputs.pull-request-number }}',
triggering_rep: '${{ github.event.repository.name }}'
}
})
- name: Notify about build start
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GLOBAL_GHA_PAT }}
script: |
await github.issues.createComment({
owner: 'rladies',
repo: $(basename ${{ github.event.repository.name }})',
issue_number: ${{ steps.make-pr.outputs.pull-request-number }},
body: `
Building test-site now! The build will take a few minutes,
but look at its progess in the [website repo](https://github.com/rladies/rladies.github.io/actions/workflows/build.yaml).
`
})

0 comments on commit 087a728

Please sign in to comment.