forked from microfeed/microfeed
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.29 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Deploy to Cloudflare Pages
on:
# push:
# branches: ["dev-v1"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
DEPLOYMENT_ENVIRONMENT:
description: 'Deployment environment'
required: true
type: choice
options:
- preview
- production
default: 'production'
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_PROJECT_NAME: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
R2_PUBLIC_BUCKET: ${{ secrets.R2_PUBLIC_BUCKET || secrets.CLOUDFLARE_PROJECT_NAME }}
DEPLOYMENT_ENVIRONMENT: ${{ inputs.DEPLOYMENT_ENVIRONMENT }}
PRODUCTION_BRANCH: main
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: ${{ github.event.inputs.DEPLOYMENT_ENVIRONMENT }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: borales/[email protected]
with:
cmd: setup:production
- name: Deploy to Cloudflare Pages [${{ inputs.DEPLOYMENT_ENVIRONMENT }}]
uses: borales/[email protected]
with:
cmd: deploy:github