JuliaPluto / static-export-template

A template to automatically convert Pluto notebooks to an HTML website with GitHub Pages. Demo page:
https://juliapluto.github.io/static-export-template/
100 stars 17 forks source link

Use `permissions` field in workflow to get write permission #18

Closed fonsp closed 1 year ago

fonsp commented 1 year ago

The recent issues #15 #17 were caused by a change in the default permissions: https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/

What I didn't realise, is that you can still use the permissions field to define write permission in the workflow: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

This means that we don't need to ask users to change their default permissions (#16), and our instructions are just 3 steps again! 🎉

fonsp commented 1 year ago

I tested this and it works: https://github.com/JuliaPluto/static-export-template-fork-test-1/actions/runs/4407362284/jobs/7720921995

fonsp commented 1 year ago