From a0168164a1470481fbbe7ccf41a1c681614eaa47 Mon Sep 17 00:00:00 2001 From: Eduard Marbach Date: Tue, 5 Nov 2024 12:33:06 +0100 Subject: [PATCH] ci: try publish pages with official action --- .github/workflows/documentation.yml | 44 ++++++++++++++++++----------- docs/static/CNAME | 1 + 2 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 docs/static/CNAME diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 1806b4a..b17d5a2 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -10,12 +10,9 @@ on: paths: - docs/** -permissions: - contents: write - jobs: - deploy: - name: Deploy Documentation + build: + name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -37,15 +34,30 @@ jobs: pnpm i pnpm build - # Popular action to deploy to GitHub Pages: - # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - if: github.event_name == 'push' # && github.ref == 'refs/heads/main' + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action with: - github_token: ${{ secrets.GITHUB_TOKEN }} - # Build output to publish to the `gh-pages` branch: - publish_dir: ./docs/build - # Assign commit authorship to the official GH-Actions bot - user_name: github-actions[bot] - user_email: github-actions[bot]@users.noreply.github.com + path: ./docs/build + + # Deploy job + deploy: + # Add a dependency to the build job + needs: build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + # Specify runner + deployment step + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action diff --git a/docs/static/CNAME b/docs/static/CNAME new file mode 100644 index 0000000..4f16e4c --- /dev/null +++ b/docs/static/CNAME @@ -0,0 +1 @@ +configarr.raydak.de