workflow/docs: Give token write permission to push gh-pages
authorDan Nicholson <dbn@endlessos.org>
Tue, 25 May 2021 20:25:28 +0000 (14:25 -0600)
committerDan Nicholson <dbn@endlessos.org>
Tue, 25 May 2021 20:25:28 +0000 (14:25 -0600)
The ostree repo has read permissions set for workflows, which prevents
the documentation job from pushing the built docs to the gh-pages
branch. Raise the job's permissions to write for repo contents to allow
that.

.github/workflows/docs.yml

index 6ff16fe7e1c9a51502b8831153efbc6d58f0b49d..05ede2e97340e390a82a87acfdd877c5c6e7295c 100644 (file)
@@ -10,6 +10,10 @@ jobs:
   docs:
     name: Build documentation
     runs-on: ubuntu-latest
+    permissions:
+      # This job pushes to the gh-pages branch, so the token needs write
+      # privileges for repo contents.
+      contents: write
     steps:
       - name: Checkout repository
         uses: actions/checkout@v2