Skip to content

Trigger Build pkgdown Site #5

Trigger Build pkgdown Site

Trigger Build pkgdown Site #5

name: Trigger Build pkgdown Site
on:
workflow_run:
workflows: ["Increment version"] # Ensure this matches the name in increment_version.yaml
types:
- completed
workflow_dispatch:
jobs:
trigger-build:
runs-on: ubuntu-latest
steps:
- name: Trigger Build pkgdown site
uses: actions/github-script@v6
with:
script: |
const workflow_id = "Build pkgdown site"; // The name of the workflow to trigger
const response = await github.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id,
ref: context.ref, // The branch or tag to run the workflow on
});
console.log(`Triggered workflow: ${response.data.message}`);