From 168c88df7fbbc56520f3df50db38e67b7fe10c3d Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Sat, 1 Feb 2025 13:25:49 +0100 Subject: [PATCH] prepare pages deployment --- .github/workflows/{citest.yml => build.yml} | 33 +++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) rename .github/workflows/{citest.yml => build.yml} (53%) diff --git a/.github/workflows/citest.yml b/.github/workflows/build.yml similarity index 53% rename from .github/workflows/citest.yml rename to .github/workflows/build.yml index 1049eff..1b753ec 100644 --- a/.github/workflows/citest.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: citest +name: build & deploy on: push: @@ -11,11 +11,22 @@ on: required: false default: false +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + jobs: - citest: + build: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate uses: mxschmitt/action-tmate@v3 if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} @@ -27,3 +38,21 @@ jobs: - name: run build run: | make build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: .vitepress/dist + + deploy: + needs: build + runs-on: ubuntu-24.04 + # only deploy from master branch + if: github.ref == 'refs/heads/master' + steps: + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4