Skip to content

Commit

Permalink
ci: pass cloudflare credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
rndquu committed Mar 13, 2024
1 parent d8aba50 commit 8a618f3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Build & Deploy

on:
push:
pull_request:
workflow_dispatch:
workflow_run:
workflows: ["Init"]
types:
- completed

permissions:
contents: read
Expand All @@ -28,6 +29,7 @@ jobs:
yarn
yarn build
env: # Set environment variables for the build
FRONTEND_URL: "https://onboard.ubq.fi"
SUPABASE_URL: "https://wfzpewmlyiozupulbuur.supabase.co"
SUPABASE_ANON_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6IndmenBld21seWlvenVwdWxidXVyIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTU2NzQzMzksImV4cCI6MjAxMTI1MDMzOX0.SKIL3Q0NOBaMehH0ekFspwgcu3afp3Dl9EDzPqs1nKs"

Expand All @@ -39,4 +41,6 @@ jobs:
output_directory: "static"
current_branch: ${{ github.ref_name }}
pull_request_number: ${{ github.event.pull_request.number }}
cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
commit_sha: ${{ github.event.pull_request.head.sha }}
15 changes: 15 additions & 0 deletions .github/workflows/init.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Initializes the "build and deploy" workflow to have access to github secrets in that workflow
name: Init

on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Init
run: |
echo "Initialized"

0 comments on commit 8a618f3

Please sign in to comment.