From 6f611308cdb0f6f49656c38485f5feedfb83eb0e Mon Sep 17 00:00:00 2001 From: Julian Schuler Date: Wed, 2 Oct 2024 12:10:19 +0200 Subject: [PATCH] Only deploy to GitHub pages on release --- .github/workflows/deploy-to-pages.yaml | 38 -------------------------- .github/workflows/release.yml | 29 ++++++++++++++++++-- 2 files changed, 27 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/deploy-to-pages.yaml diff --git a/.github/workflows/deploy-to-pages.yaml b/.github/workflows/deploy-to-pages.yaml deleted file mode 100644 index 930a3e2..0000000 --- a/.github/workflows/deploy-to-pages.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: Deploy customizer to GitHub pages - -on: - push: - branches: ["main"] - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Install wasm-pack - uses: jetli/wasm-pack-action@v0.4.0 - - name: Build using wasm-pack - run: wasm-pack build customizer_wasm --target no-modules --out-dir ../web/pkg --no-typescript --no-pack - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: "web" - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 36e2981..9e93cd2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,8 +39,6 @@ jobs: path: bin/ release: name: Release - env: - version: ${{ github.ref_name }} needs: build runs-on: ubuntu-latest permissions: @@ -50,6 +48,7 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: + pattern: "binary-*" merge-multiple: true - name: Release executables uses: softprops/action-gh-release@v2 @@ -58,3 +57,29 @@ jobs: body: The executables for the concavum customizer ${{ github.ref_name }}. files: '*' fail_on_unmatched_files: true + deploy-to-pages: + name: Deploy to GitHub pages + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Install wasm-pack + uses: jetli/wasm-pack-action@v0.4.0 + - name: Build using wasm-pack + run: wasm-pack build customizer_wasm --target no-modules --out-dir ../web/pkg --no-typescript --no-pack + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: "web" + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4