Skip to content

fix: correct typo in blog subscription text and edit the 2025 review #37

fix: correct typo in blog subscription text and edit the 2025 review

fix: correct typo in blog subscription text and edit the 2025 review #37

Workflow file for this run

name: Production deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches:
- main
jobs:
build_site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22.1.0
cache: 'pnpm'
- 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: Install Vercel CLI
run: pnpm i -g vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Save dist folder as an Artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist
- name: Save .vercel folder as an Artifact
uses: actions/upload-artifact@v4
with:
name: .vercel
path: ./.vercel
test_e2e:
timeout-minutes: 60
needs: build_site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22.1.0
cache: 'pnpm'
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Restore pnpm cache
uses: actions/cache/restore@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: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Download dist folder Artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
deploy_production:
runs-on: ubuntu-latest
needs: [build_site, test_e2e]
steps:
- uses: actions/checkout@v4
- name: Download .vercel folder Artifact
uses: actions/download-artifact@v4
with:
name: .vercel
path: ./.vercel
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
performance_test:
runs-on: ubuntu-latest
needs: deploy_production
steps:
- uses: actions/checkout@v4
- name: Download dist folder Artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22.1.0
cache: 'pnpm'
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Restore pnpm cache
uses: actions/cache/restore@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: Install unlighthouse
run: pnpm install -g @unlighthouse/cli puppeteer
- name: Run unlighthouse
run: unlighthouse-ci --site https://nirjan-dev-astro.vercel.app --build-static