Skip to content

feat: automate deployments #2

feat: automate deployments

feat: automate deployments #2

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v1
with:
version: master
- name: Run tests
run: zig build test -Djava_compat
- name: Build playground
run: zig build playground -Doptimize=ReleaseFast
- name: Deploy to Vercel
if: success() && github.ref == 'refs/heads/main'
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_NAME: ${{ secrets.VERCEL_PROJECT_NAME }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
run: |
npm install -g vercel
vercel --token $VERCEL_TOKEN --prod --confirm --project $VERCEL_PROJECT_NAME --org-id $VERCEL_ORG_ID