diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 254ab6e..e6eff06 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -13,6 +13,9 @@ jobs: name: Deploy runs-on: ubuntu-latest + env: + DATABASE_URL: ${{ secrets.DATABASE_URL }} + steps: - name: Check out code uses: actions/checkout@v4 @@ -39,5 +42,11 @@ jobs: - name: Push to Google run: gcloud builds submit --tag us-central1-docker.pkg.dev/notely-453912/notely-ar-repo/notely:latest . + - name: Install Goose + run: go install github.com/pressly/goose/v3/cmd/goose@latest + + - name: Run migrations + run: scripts/migrateup.sh + - name: Deploy to Cloud Run run: gcloud run deploy notely --image us-central1-docker.pkg.dev/notely-453912/notely-ar-repo/notely:latest --region us-central1 --allow-unauthenticated --project notely-453912 --max-instances=4 \ No newline at end of file