Skip to content

Dev

Dev #96

Workflow file for this run

name: Preview
on:
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
BuildDeploy:
runs-on: ubuntu-latest
environment: cfDev
permissions:
actions: read
contents: read
deployments: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: https://registry.npmjs.org
- name: Restore & cache dependencies
uses: actions/cache@v4
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ hashFiles('package-lock.json') }}
${{ runner.os }}-
- name: Install Dependencies & Build
run: npm i -g bun && bun install && bun run cf:build
- name: Publish to Cloudflare Pages (Preview)
id: deployment
uses: cloudflare/pages-action@v1
with:
wranglerVersion: 3
projectName: gilbertly-com
directory: .vercel/output/static
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}