name: Deploy on: push: branches: [main] pull_request: branches: [main] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup pnpm uses: pnpm/action-setup@v3 with: version: 9 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 22 cache: 'pnpm' - name: Install dependencies run: pnpm install --frozen-lockfile - name: Lint run: pnpm run lint - name: Type check run: pnpm run check - name: Build run: pnpm run build env: SITE_URL: ${{ secrets.SITE_URL }} # Uncomment and configure for your deployment platform # # Vercel deployment: # - name: Deploy to Vercel # if: github.ref == 'refs/heads/main' # uses: amondnet/vercel-action@v25 # with: # vercel-token: ${{ secrets.VERCEL_TOKEN }} # vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} # vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} # vercel-args: '--prod' # # Netlify deployment: # - name: Deploy to Netlify # if: github.ref == 'refs/heads/main' # uses: nwtgck/actions-netlify@v2 # with: # publish-dir: './dist' # production-branch: main # github-token: ${{ secrets.GITHUB_TOKEN }} # env: # NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} # NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} # # Cloudflare Pages deployment: # - name: Deploy to Cloudflare Pages # if: github.ref == 'refs/heads/main' # uses: cloudflare/wrangler-action@v3 # with: # apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} # accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} # command: pages deploy dist --project-name=astro-rocket