From 7d7166af6e4e97d91abb86d748425cbc92fe3607 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Tue, 14 May 2024 00:16:18 +0200 Subject: [PATCH] Switch pages deployment from branch to actions --- .github/workflows/pages.yml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 6128d2b2c..4a9c29eb4 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -5,12 +5,19 @@ on: push: branches: - master + workflow_dispatch: permissions: - contents: write + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false jobs: - deploy: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -28,10 +35,24 @@ jobs: pip install wheel pip install git+https://github.com/spanezz/staticsite.git@v2.3 ssite build --output public + cd public + rm -rf Jenkinsfile dosagelib scripts tests - - name: Deploy - uses: peaceiris/actions-gh-pages@v4 + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - cname: dosage.rocks - github_token: ${{ secrets.GITHUB_TOKEN }} - exclude_assets: 'Jenkinsfile,dosagelib,scripts,setup.*,tests,*.ini' + path: public + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4