Skip to content

ci: add caching for Playwright browsers for faster deployment step #7

ci: add caching for Playwright browsers for faster deployment step

ci: add caching for Playwright browsers for faster deployment step #7

Workflow file for this run

name: Deploy to Cloudflare Pages
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install Dependencies
run: bun install
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v3
with:
path: |
~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
playwright-${{ runner.os }}-
- name: Install Playwright
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: bunx playwright install --with-deps
- name: Build
run: bun run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: helmyl-com
directory: build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main