Skip to content

update actions

update actions #22

name: Trigger Website
on:
pull_request:
branches:
- main
jobs:
trigger:
name: Trigger
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Trigger test build
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GLOBAL_GHA_PAT }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'rladies',
repo: 'rladies.github.io',
workflow_id: 'build-preview.yaml',
ref: 'main',
inputs: {
blogs: '${{ github.run_id }}',
triggering_issue: '${{ steps.make-pr.outputs.pull-request-number }}',
triggering_repo: '${{ github.event.repository.name }}'
}
})
- name: Notify about build start
uses: actions/github-script@v7
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-preview.yaml).
`
})