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