Skip to content

πŸ‘· update Github action #2

πŸ‘· update Github action

πŸ‘· update Github action #2

Workflow file for this run

name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches-ignore:
- main
jobs:
init:
name: Initial common steps
runs-on: ubuntu-latest
steps:
- name: πŸ›ŽοΈ Checkout
uses: actions/checkout@v3
- name: βš™οΈ Setup PNPM
uses: pnpm/action-setup@v2.2.1
with:
version: 8
- name: πŸ“ Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: node_modules
key: deps-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: πŸ”§ Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
test:
name: Test
runs-on: ubuntu-latest
needs: init
- name: πŸ›ŽοΈ Checkout

Check failure on line 42 in .github/workflows/preview.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/preview.yaml

Invalid workflow file

You have an error in your yaml syntax on line 42
uses: actions/checkout@v3
- name: βš™οΈ Setup PNPM
uses: pnpm/action-setup@v2.2.1
with:
version: 8
- name: πŸ“ Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: node_modules
key: deps-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: πŸ”§ Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: πŸ§ͺ Test
run: pnpm test
preview:
name: Deploy preview
runs-on: ubuntu-latest
environment: Preview
timeout-minutes: 10
needs: test
steps:
- name: πŸ›ŽοΈ Checkout
uses: actions/checkout@v3
- name: πŸ”§ Install Vercel CLI
run: npm install --global vercel@latest
- name: πŸ‘” Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: πŸ‘· Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: πŸš€ Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}