From 60cd5a8347ed836fbfe27d54d198e7c615364630 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 4 Nov 2024 13:45:31 -0500 Subject: [PATCH] chore(ci): Combine web build/deploy, allow manual triggers --- .github/workflows/schema_web_build.yml | 28 ------------------- .../{schema_web_deploy.yml => web_build.yml} | 22 +++++++++++---- 2 files changed, 16 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/schema_web_build.yml rename .github/workflows/{schema_web_deploy.yml => web_build.yml} (67%) diff --git a/.github/workflows/schema_web_build.yml b/.github/workflows/schema_web_build.yml deleted file mode 100644 index cc847151..00000000 --- a/.github/workflows/schema_web_build.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Schema validator web build - -on: - push: - branches: [master, main] - tags: ['*'] - pull_request: - branches: [master, main] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: denoland/setup-deno@v2 - with: - deno-version: v2.x - - run: deno task build - working-directory: ./web - - uses: actions/upload-artifact@v4 - with: - name: web - path: web/dist diff --git a/.github/workflows/schema_web_deploy.yml b/.github/workflows/web_build.yml similarity index 67% rename from .github/workflows/schema_web_deploy.yml rename to .github/workflows/web_build.yml index 8343e752..f89619f3 100644 --- a/.github/workflows/schema_web_deploy.yml +++ b/.github/workflows/web_build.yml @@ -1,9 +1,19 @@ --- -name: Schema validator web deploy +name: Web validator on: + push: + branches: [master, main] + pull_request: + branches: [master, main] release: types: [published] + workflow_dispatch: + inputs: + deploy: + description: Deploy to github-pages + required: false + type: boolean concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -14,19 +24,19 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 with: deno-version: v2.x - run: deno task build working-directory: ./web - - name: Install NPM deps - run: npm install - - name: Upload GitHub Pages artifact - uses: actions/upload-pages-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: web path: web/dist + deploy: needs: build + if: ${{ github.event_name == 'release' || inputs.deploy }} permissions: contents: read pages: write