chore: add test to release flow #14
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: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: yarn install | |
- name: 'Create env file' | |
run: | | |
touch .env | |
echo POSTGRES_URL=${{ secrets.POSTGRES_URL }} >> .env | |
- name: Code check | |
run: yarn lint | |
- name: Test | |
with: | |
start: yarn dev | |
wait-on: "http://localhost:3000" | |
- name: Deploy to Vercel | |
if: success() | |
uses: amondnet/[email protected] | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
vercel-args: '--prod' |