Skip to content

chore(deps): update pnpm tool constraint to v11.27.0 (#79) #85

chore(deps): update pnpm tool constraint to v11.27.0 (#79)

chore(deps): update pnpm tool constraint to v11.27.0 (#79) #85

Workflow file for this run

name: Portfolio
# push is main-only on purpose: a PR branch push already triggers the
# pull_request run below, so listening on "**" here would run the whole
# pipeline twice for every commit on a PR.
on:
push:
branches: [main]
paths:
- "apps/portfolio/**"
- ".github/workflows/portfolio.yml"
pull_request:
branches: [main]
paths:
- "apps/portfolio/**"
- ".github/workflows/portfolio.yml"
concurrency:
group: portfolio-${{ github.ref }}
# Never cancel a run on main: it may be midway through a Pages deploy.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
defaults:
run:
working-directory: apps/portfolio
jobs:
quality-checks:
name: Quality Checks (Lint, Type-check, Build)
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
# Version comes from the app's packageManager field, not from here.
package_json_file: apps/portfolio/package.json
- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: 24.21.0
cache: pnpm
cache-dependency-path: apps/portfolio/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run linting
run: pnpm run lint
- name: Run type checking
run: pnpm tsc --noEmit
- name: Build application
env:
VITE_SITE_URL: https://integration.utazon.fr
VITE_UTAZON_API_URL: ${{ secrets.VITE_UTAZON_API_URL }}
run: pnpm run build
# Hand the built site to deploy-preview so it ships exactly what was
# checked here, rather than a second build of the same commit.
- name: Upload build output
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: portfolio-dist
path: apps/portfolio/dist
retention-days: 1
if-no-files-found: error
deploy-preview:
name: Deploy Preview
needs: quality-checks
# Skip the release workflow's own version-bump commit: production was just
# deployed by release-portfolio.yml, a preview deploy here is redundant.
if: >-
github.ref == 'refs/heads/main'
&& github.event_name == 'push'
&& !startsWith(github.event.head_commit.message, 'chore: bump version')
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
# Version comes from the app's packageManager field, not from here.
package_json_file: apps/portfolio/package.json
- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: 24.21.0
cache: pnpm
cache-dependency-path: apps/portfolio/pnpm-lock.yaml
# Installed for the pinned wrangler in devDependencies, not to rebuild.
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download build output
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: portfolio-dist
path: apps/portfolio/dist
- name: Deploy to Cloudflare Pages (Preview)
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
workingDirectory: apps/portfolio
command: pages deploy dist --project-name=utazon-portfolio --branch=main