Files
guz.one/.github/workflows/deploy-preview.yml
Gustavo "Guz" L. de Mello ccd798e613 chore: rename repository
2024-05-23 20:40:11 -03:00

49 lines
1.2 KiB
YAML

name: Deploy preview to Vercel
on:
push:
branches:
- dev
jobs:
deploy:
name: Deploy
if: ${{ github.repository == 'dot013/.www' }}
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
deployments: write
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
- name: Build
run: |
pnpm install
go install github.com/a-h/templ/cmd/templ@latest
make build-vercel
- name: Deploy
uses: BetaHuhn/deploy-to-vercel-action@v1
with:
GITHUB_TOKEN: ${{ SECRETS.GITHUB_TOKEN }}
VERCEL_TOKEN: ${{ SECRETS.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ SECRETS.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
PRODUCTION: false