Skip to content

Commit

Permalink
Merge pull request #56 from bbland1/bbland1-patch-1
Browse files Browse the repository at this point in the history
Update preview.yml
  • Loading branch information
bbland1 authored Aug 27, 2024
2 parents c7a716f + 9222979 commit d181065
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,38 @@
name: GitHub Actions Vercel Preview Deployment

on:
push:
branches:
- '*'
- '!main'
pull_request_target:
branches:
- main

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

jobs:
eslint:
name: Lint Code
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install pacakges
- name: Install packages
run: npm ci
- name: Run ESLint
run: npm run lint
- name: Run Test locally
run: npm run ci:test
cleaup:

cleanup:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target'
steps:
- uses: strumwolf/delete-deployment-environment@v2
with:
Expand All @@ -47,6 +43,7 @@ jobs:
Deploy-Preview:
runs-on: ubuntu-latest
needs: eslint
if: github.event_name == 'pull_request_target'
steps:
- uses: actions/checkout@v3
- name: Install Vercel CLI
Expand Down

0 comments on commit d181065

Please sign in to comment.