Skip to content

add deploy CI

add deploy CI #2

Workflow file for this run

name: Deploy to Cloudflare Pages
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build
run: cd preview-ui && yarn install && yarn build
- name: Publish to Cloudflare Pages
if: env.CLOUDFLARE_API_TOKEN != ''
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: ./preview-ui/dist