From 53a348db607d4b81a2ca78a89e2affb4d90d5a80 Mon Sep 17 00:00:00 2001 From: Guillermo Perez Date: Thu, 23 Nov 2023 13:09:08 +0100 Subject: [PATCH 1/2] fix docs pages upload --- .github/workflows/docs.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1f393c59c6..c4f206b3bf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,7 +11,12 @@ jobs: permissions: contents: read id-token: write + pages: write runs-on: ubuntu-latest-4-cores + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout repository uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4 @@ -41,22 +46,14 @@ jobs: run: | echo "" \ > ./target/doc/index.html + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: upload Docs files uses: actions/upload-pages-artifact@v2 with: path: ./target/doc - deploy-docs: - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - permissions: - pages: write # to deploy to Pages - id-token: write - # Deploy to the github-pages environment - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - name: Deploy Docs id: deployment - uses: actions/deploy-pages@v2 \ No newline at end of file + uses: actions/deploy-pages@v2 From 7afe45d5ce52c9c55a3d7a42fa8f1e9a4548f8e4 Mon Sep 17 00:00:00 2001 From: Guillermo Perez Date: Thu, 23 Nov 2023 14:21:53 +0100 Subject: [PATCH 2/2] fix pages permission error --- .github/workflows/docs.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c4f206b3bf..f74cb6f8ad 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,7 @@ jobs: # Deploy to the github-pages environment environment: name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout repository uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4 @@ -48,12 +48,19 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v3 - + + - name: Fix permissions + run: | + chmod -c -R +rX "./target/doc" | while read line; do + echo "::warning title=Invalid file permissions automatically fixed::$line" + done + - name: upload Docs files uses: actions/upload-pages-artifact@v2 with: path: ./target/doc - name: Deploy Docs + # if: github.ref == 'refs/heads/main' id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v2