From 752fafb1c66dfa4ba33b9f58faf75a3e6033418c Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Fri, 3 May 2024 13:45:18 +0700 Subject: [PATCH] ci: add workflow for deploying modules to GitHub Pages --- .github/workflows/deploy.yaml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..505d152 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,41 @@ +name: Deploy +on: + workflow_dispatch: + push: + branches: [main] +jobs: + deploy-pages: + name: Deploy Pages + runs-on: ubuntu-latest + permissions: + id-token: write + pages: write + environment: + name: github-pages + url: ${{ steps.deploy-pages.outputs.page_url }} + concurrency: + group: pages + cancel-in-progress: true + steps: + - name: Checkout + uses: actions/checkout@v4.1.4 + with: + fetch-depth: 0 + + - name: Copy Modules + run: | + mkdir -p build/page + cp cmake/Assertion.cmake build/page/$(git branch --show-current) + for tag in $(git tag); do + git checkout $tag + cp cmake/Assertion.cmake build/page/$tag + done + + - name: Upload Documentation + uses: actions/upload-pages-artifact@v3.0.1 + with: + path: build/page + + - name: Deploy Pages + id: deploy-pages + uses: actions/deploy-pages@v4.0.5