fix: deploy action 8 #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to EC2 | |
on: | |
push: | |
branches: | |
- "**" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: npm install | |
- name: Link Supabase && init db && populate | |
env: | |
SUPABASE_PROJECT_REF: ${{ env.SUPABASE_PROJECT_REF }} | |
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} | |
SUPABASE_DB_URL: ${{ secrets.SUPABASE_DB_URL }} | |
run: | | |
npx supabase link --project-ref dtdsoudleeheckhqyqsk | |
yes | npx supabase db reset --linked --db-url $SUPABASE_DB_URL | |
npx tsx tools/populateDbWithFakeData.ts |