diff --git a/.github/workflows/platformatic-preview.yml b/.github/workflows/platformatic-preview.yml index b9b6510..df75340 100644 --- a/.github/workflows/platformatic-preview.yml +++ b/.github/workflows/platformatic-preview.yml @@ -26,22 +26,12 @@ jobs: pull_sha=$(jq --raw-output .pull_request.base.sha "$GITHUB_EVENT_PATH") echo "pull_sha=${pull_sha}" >> $GITHUB_OUTPUT echo $pull_sha - - uses: neondatabase/delete-branch-by-name-action@main + - uses: neondatabase/create-branch-action@v4 with: project_id: ${{ secrets.NEON_PROJECT_ID }} branch_name: ${{ steps.get_pull_number.outputs.pull_sha }} api_key: ${{ secrets.NEON_API_KEY }} - - run: sleep 10 - - uses: neondatabase/create-branch-action@v2 - with: - project_id: ${{ secrets.NEON_PROJECT_ID }} - branch_name: ${{ steps.get_pull_number.outputs.pull_sha }} - api_key: ${{ secrets.NEON_API_KEY }} - username: ${{ secrets.DBUSER }} - Password: ${{ secrets.DBPASSWORD }} id: create-branch - - name: Get DATABASE_URL - run: echo DATABASE_URL=${{ steps.create-branch.outputs.db_url}}/neondb - name: Deploy project uses: platformatic/onestep@latest with: @@ -56,4 +46,4 @@ jobs: PLT_ADMIN_SECRET: ${{ secrets.PLT_ADMIN_SECRET }} PLT_LOCK: ${{ vars.PLT_LOCK }} PLT_LEADER_POLL: ${{ vars.PLT_LEADER_POLL }} - DATABASE_URL: ${{ steps.create-branch.outputs.db_url}}/neondb + DATABASE_URL: ${{ steps.create-branch.outputs.db_url }}