Skip to content

Cloudflare Pages

Cloudflare Pages #2

Workflow file for this run

name: CI/CD
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
- name: Test
run: npm run test
- name: Test lint
run: npm run test:lint
- name: Test formatting
run: npm run test:format
- name: Build
run: npm run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: adsr
directory: out
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build
path: ./out