Skip to content

Deploy static content to Cloudflare Pages CDN #2

Deploy static content to Cloudflare Pages CDN

Deploy static content to Cloudflare Pages CDN #2

name: Deploy static content to Cloudflare Pages CDN
on:
# Runs on pushes targeting the default branch and only when
# changes are made to files within the ./webpage folder
push:
branches: ["main"]
paths:
- './webpage/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch: null
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
# Build the static assets
# - name: Build
# run: npm install && npm run build
# working-directory: ./
# Publish to https://beepboopbot.pages.dev/
- name: Publish
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: beepboopbot # See projects using CLI `npx wrangler pages project list`
directory: ./webpage # e.g. 'dist'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}