Skip to content

Commit

Permalink
Merge branch 'main' into 25-new-function-sunsetter
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderDevisscher authored Aug 23, 2024
2 parents 279162c + 0a79ae4 commit 978f4e0
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/trigger_build_pkgdown_site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
workflows: ["Increment version"] # Ensure this matches the name in increment_version.yaml
types:
- completed
workflow_dispatch:

jobs:
trigger-build:
Expand All @@ -14,15 +15,11 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const { exec } = require('child_process');
exec('gh workflow run "Build pkgdown site"', (error, stdout, stderr) => {
if (error) {
console.error(`Error: ${error.message}`);
return;
}
if (stderr) {
console.error(`Stderr: ${stderr}`);
return;
}
console.log(`Stdout: ${stdout}`);
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}`);

0 comments on commit 978f4e0

Please sign in to comment.