Skip to content

trigger-preview

trigger-preview #52

name: trigger-preview
on:
workflow_run:
workflows:
- trigger-book-build
types:
- requested
- completed
permissions:
contents: write
jobs:
find-pull-request:
uses: ProjectPythia/cookbook-actions/.github/workflows/find-pull-request.yaml@main
deploy-preview:
needs: find-pull-request
if: github.event.workflow_run.conclusion == 'success'
uses: ProjectPythia/cookbook-actions/.github/workflows/deploy-book.yaml@main
with:
artifact_name: book-zip-${{ needs.find-pull-request.outputs.number }}
destination_dir: _preview/${{ needs.find-pull-request.outputs.number }} # deploy to subdirectory labeled with PR number
is_preview: 'true'
publish_dir: "src/_build/html"
github_token: ${{ secrets.GITHUB_TOKEN }}

Check failure on line 25 in .github/workflows/trigger-preview.yml

View workflow run for this annotation

GitHub Actions / trigger-preview

Invalid workflow file

The workflow is not valid. .github/workflows/trigger-preview.yml (Line: 25, Col: 21): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.GITHUB_TOKEN
preview-comment:
needs: find-pull-request
uses: ProjectPythia/cookbook-actions/.github/workflows/preview-comment.yaml@main
with:
pull_request_number: ${{ needs.find-pull-request.outputs.number }}
sha: ${{ needs.find-pull-request.outputs.sha }}