Skip to content

Commit

Permalink
Update dispatch.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg committed Jun 16, 2023
1 parent 8237291 commit f3d748d
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ on:
release:
types: [published]

name: pkgdown
name: dispatch-pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest

steps:
- name: Install curl on Linux
if: runner.os == 'Linux'
run: sudo apt-get install curl

- name: Send dispatch
if: runner.os == 'Linux'
run: curl -XPOST -u "${{ secrets.GITHUB_USERNAME}}:${{secrets.GITHUB_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/ddsjoberg/website-test/actions/workflows/pkgdown.yaml/dispatches --data '{"ref": "main"}'
# This workflow contains a single job called "build"
dispatchpkgdown:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.PAT_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'ddsjoberg',
repo: 'website-test',
workflow_id: 'pkgdown.yaml',
ref: 'main'
})

0 comments on commit f3d748d

Please sign in to comment.