trigger-workflow-document #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
repository_dispatch: | |
types: [trigger-workflow-document] | |
name: Document | |
jobs: | |
document: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get changed .R file(s) in the R folder | |
id: changed-R-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
files: R/*.R | |
- name: If any .R file(s) in the R folder changed then update documentation and commit | |
if: steps.changed-R-files.outputs.any_changed == 'true' | |
uses: ./.github/workflows/document | |
- name: Trigger next workflow | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: ${{ github.repository }} | |
event-type: trigger-workflow-render-rmarkdown | |
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' |