Skip to content

deploy-develop-cn-site #62

deploy-develop-cn-site

deploy-develop-cn-site #62

name: Deploy Develop cn Site to Cloudflare Pages
on:
workflow_dispatch:
inputs:
branch:
default: "develop"
description: "branch"
type: string
repository_dispatch:
types:
- deploy-develop-cn-site
jobs:
deploy:
name: Deploy to Cloudfalre Pages
runs-on: ubuntu-latest
concurrency: build-dev-cn-site
steps:
- uses: actions/checkout@v3
with:
repository: immersive-translate/site
ref: ${{github.event.inputs.branch || 'develop'}}
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
- run: git checkout -b main
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
cache-dependency-path: ./package-lock.json
- name: Build website
run: npm i && cd cn && npm run build:develop
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.IMMERSIVE_CLOUDFLARE_API_TOKEN }}
accountId: ${{secrets.IMMERSIVE_CLOUDFLARE_ACCOUNT_ID}}
projectName: develop-cn
directory: cn/build
# Optional: Enable this if you want to have GitHub Deployments triggered
# gitHubToken: ${{ secrets.GITHUB_TOKEN }}