Skip to content

Merge pull request #44 from bitmark-inc/update-daily-schedule-time #37

Merge pull request #44 from bitmark-inc/update-daily-schedule-time

Merge pull request #44 from bitmark-inc/update-daily-schedule-time #37

name: Deploy Remote Configs
on:
push:
branches:
- main
- dev
workflow_dispatch:
inputs:
environment:
description: 'Deployment Environment'
required: true
default: 'Production'
type: choice
options:
- Production
- Development
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
environment: ${{ github.event.inputs.environment || (github.ref == 'refs/heads/main' && 'Production' || 'Development') }}
steps:
- name: Checkout configs folder
uses: actions/checkout@v4
with:
sparse-checkout: |
configs
sparse-checkout-cone-mode: false
- name: Create version.json
run: |
echo "{\"commit\": \"${{ github.sha }}\", \"environment\": \"${{ github.event.inputs.environment || (github.ref == 'refs/heads/main' && 'Production' || 'Development') }}\"}" > configs/version.json
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy configs --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }}