diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/cloudflare-deploy.yml similarity index 70% rename from .github/workflows/build-deploy.yml rename to .github/workflows/cloudflare-deploy.yml index 1944ccc..28d7b64 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/cloudflare-deploy.yml @@ -1,4 +1,4 @@ -name: Build & Deploy +name: Cloudflare Build & Deploy on: push: @@ -15,32 +15,33 @@ permissions: # Cancel in-progress runs when a newer run is triggered (e.g. two PRs merged quickly). concurrency: - group: deploy-production + group: cloudflare-pages-${{ github.ref }} cancel-in-progress: true jobs: - build: - name: Build & Deploy + build-and-deploy: + name: Build & Deploy on Cloudflare Pages runs-on: ubuntu-24.04 timeout-minutes: 15 steps: - name: Checkout the Codebase - uses: actions/checkout@v6 - - - name: Install pnpm - uses: pnpm/action-setup@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + with: + persist-credentials: false - - name: Setup Node.js - uses: actions/setup-node@v6 + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa with: - node-version: 24 - cache: pnpm + version: 0.1.19 + node-version: "24" + cache: true + run-install: false - name: Install dependencies - run: pnpm i --frozen-lockfile --prefer-offline + run: vp install --frozen-lockfile --prefer-offline - name: Generate static site - run: pnpm run build:ssg + run: vp run build:ssg env: NUXT_PUBLIC_LEGAL_NAME: ${{ vars.NUXT_PUBLIC_LEGAL_NAME }} NUXT_PUBLIC_LEGAL_OCCUPATION: ${{ vars.NUXT_PUBLIC_LEGAL_OCCUPATION }} @@ -53,7 +54,7 @@ jobs: NUXT_PUBLIC_LEGAL_VAT_ID: ${{ vars.NUXT_PUBLIC_LEGAL_VAT_ID }} - name: Deploy to Cloudflare Pages - uses: cloudflare/wrangler-action@v3 + uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} diff --git a/.github/workflows/validation-and-tests.yml b/.github/workflows/validation-and-tests.yml index 97666b3..3c283fd 100755 --- a/.github/workflows/validation-and-tests.yml +++ b/.github/workflows/validation-and-tests.yml @@ -18,7 +18,7 @@ jobs: permissions: pull-requests: read steps: - - uses: amannn/action-semantic-pull-request@v6 + - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -32,36 +32,36 @@ jobs: matrix: include: - name: Lint & Format Check - command: pnpm test:lint + command: vp run test:lint - name: Redirect Artifact Check - command: pnpm test:redirects + command: vp run test:redirects - name: Type Check - command: pnpm test:types + command: vp run test:types steps: # Check out the repository - name: Checkout the Codebase - uses: actions/checkout@v6 - - # Install and set up pnpm for use in the workflow - - name: Install pnpm - uses: pnpm/action-setup@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + with: + persist-credentials: false - # Set up Node.js and enable pnpm caching - - name: Setup Node.js - uses: actions/setup-node@v6 + # Install and set up Vite+ with Node and pnpm for use in the workflow + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa with: - node-version: 24 - cache: pnpm + version: 0.1.19 + node-version: "24" + cache: true + run-install: false # Install project dependencies with automatic `nuxt prepare` at the end. # Thanks to the cache, this step is extremely fast on subsequent runs. - name: Install dependencies - run: pnpm i --frozen-lockfile --prefer-offline + run: vp install --frozen-lockfile --prefer-offline # Execute the specific check command from the matrix - name: Run Check - # could also run as `pnpm test` as all commands are defined to run sequentially, but more control this way for now + # could also run as `vp run test` as all commands are defined to run sequentially, but more control this way for now run: ${{ matrix.command }} # This job acts as a single, final status check for branch protection.