Skip to content

Adjust conditional run of build workflow steps #6

Adjust conditional run of build workflow steps

Adjust conditional run of build workflow steps #6

Workflow file for this run

name: Setup, build and Deploy

Check failure on line 1 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: on-code-quality-failure
on:
workflow_run:
workflows: ["Code quality"]
types:
- completed
workflow_dispatch:
concurrency:
group: "build"
cancel-in-progress: true
jobs:
on-code-quality-failure:
runs-on: ubuntu-latest
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build artifact
run: pnpm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4