Skip to content

Fix publish permissions #5

Fix publish permissions

Fix publish permissions #5

on:
push:
branches: [main, master]
release:
types: [published]
workflow_dispatch: {}
name: demo-quarto-app
jobs:
demo-website:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: quarto-website-${{ github.event_name != 'pull_request' || github.run_id }}
permissions:

Check failure on line 16 in .github/workflows/publish-demo-app.yml

View workflow run for this annotation

GitHub Actions / demo-quarto-app

Invalid workflow file

The workflow is not valid. .github/workflows/publish-demo-app.yml (Line: 16, Col: 7): Unexpected value 'permissions'
contents: read
pages: write
id-token: write
steps:
- name: "Check out repository"
uses: actions/checkout@v4
# To render using knitr, we need a few more setup steps...
# If we didn't want the examples to use `engine: knitr`, we could
# skip a few of the setup steps.
- name: "Setup pandoc"
uses: r-lib/actions/setup-pandoc@v2
- name: "Setup R"
uses: r-lib/actions/setup-r@v2
# Pinned shinylive dependency
- name: "Setup R dependencies for Quarto's knitr engine"
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages:
cran::[email protected]
any::knitr
any::rmarkdown
any::downlit
any::xml2
# Setup Quarto
- name: "Set up Quarto"
uses: quarto-dev/quarto-actions/setup@v2
# Install quarto extensions
- name: "Install quarto extension for shinylive"
shell: bash
run: |
quarto add --no-prompt quarto-ext/shinylive
# Render the Quarto file
- name: "Render working directory"
uses: quarto-dev/quarto-actions/render@v2
# Upload a tar file that will work with GitHub Pages
# Make sure to set a retention day to avoid running into a cap
# This artifact shouldn't be required after deployment onto pages was a success.
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
retention-days: 1
# Use an Action deploy to push the artifact onto GitHub Pages
# This requires the `Action` tab being structured to allow for deployment
# instead of using `docs/` or the `gh-pages` branch of the repository
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2