Skip to content

pages-action

Actions

About

Deploy Cloudflare Pages with GitHub Actions
v0.6
Latest
Star (3)

Pages Action

typescript-action status

Deploy your Cloudflare Pages by GitHub Actions.

Motivation

Cloudflare Pages' automatic git deployments are really powerful and easy to use. However, when you're working in monorepo, or if you just change README.md only, it may make you uncomfortable to trigger deployment. So I automated the deployment with GitHub Action, using Cloudflare v4 API.

This action request Cloudflare Pages to build the main branch and poll the response until all steps are finished. It provides a greater experience than simply calling deploy hooks because if you just call the deploy hooks, you cannot notice whether the build fails or not.

Inputs

Usage

name: Publish page

on:
  push:
    # It deploys when the main branch changes only.
    branches: [main]
    # It deploys when the following files/directories are changed only.
    paths:
      - packages/pages/**
      - .github/workflows/publish-page.yml

jobs:
  publish:
    name: Publish to Cloudflare Pages
    runs-on: ubuntu-latest
    steps:
      - name: Deploy pages
        uses: SeokminHong/pages-action@v0.6
        with:
          accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
          projectName: {{ page_name }}
          token: ${{ secrets.CLOUDFLARE_TOKEN }}
          branch: dev

pages-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Deploy Cloudflare Pages with GitHub Actions
v0.6
Latest

pages-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.