@@ -2,6 +2,7 @@ name: Build & Deploy
2
2
3
3
on :
4
4
push :
5
+ pull_request :
5
6
workflow_dispatch :
6
7
7
8
jobs :
12
13
steps :
13
14
- name : Check out repository
14
15
uses : actions/checkout@v4
16
+ with :
17
+ submodules : " recursive" # Ensures submodules are checked out
15
18
16
19
- name : Set up Node.js
17
20
uses : actions/setup-node@v4
@@ -24,31 +27,17 @@ jobs:
24
27
yarn build
25
28
echo -n $(echo "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}" | cut -c1-7) > static/commit.txt
26
29
27
- - name : Check Cloudflare API Token
28
- id : check_token
29
- run : |
30
- if [[ -z "${{ secrets.CLOUDFLARE_API_TOKEN }}" ]]; then
31
- echo "Cloudflare API token is not set. Skipping deployment."
32
- echo "skip=true" >> $GITHUB_ENV
33
- else
34
- echo "skip=false" >> $GITHUB_ENV
35
- fi
36
- shell : bash
37
-
38
30
- name : Deploy to Cloudflare
39
31
if : env.skip != 'true'
40
32
uses : ubiquity/cloudflare-deploy-action@main
41
33
with :
42
- cloudflare_api_token : ${{ secrets.CLOUDFLARE_API_TOKEN }}
34
+ cloudflare_api_token : JWo5dPsoyohH5PRu89-RktjCvRN0-ODC6CC9ZBqF # Specifically scoped for public contributors to automatically deploy to our team Cloudflare account
43
35
repository : ${{ github.repository }}
44
36
production_branch : ${{ github.event.repository.default_branch }}
45
37
output_directory : " static"
46
38
current_branch : ${{ github.ref_name }}
47
39
pull_request_number : ${{ github.event.pull_request.number }}
48
40
commit_sha : ${{ github.sha }}
49
- app_private_key : ${{ secrets.APP_PRIVATE_KEY }}
50
- app_id : ${{ secrets.APP_ID }}
51
- app_installation_id : ${{ secrets.APP_INSTALLATION_ID }}
52
41
# Add any environment variables you need to pass along here
53
42
# SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
54
43
# SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
0 commit comments