-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 900 Bytes
/
deploy.yml
File metadata and controls
36 lines (29 loc) · 900 Bytes
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
name: Deploy Supabase Functions
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Install dependencies
run: |
npm install
- name: Deploy Supabase Functions
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
run: |
for function in supabase/functions/*; do
if [ -d "$function" ] && [ "$(basename "$function")" != "_shared" ]; then
function_name=$(basename "$function")
echo "Deploying function: $function_name"
npx supabase functions deploy "$function_name" --project-ref ${{ secrets.SUPABASE_PROJECT_REF }}
fi
done