36 lines
756 B
YAML
36 lines
756 B
YAML
name: CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
static-analysis:
|
|
name: Static Analysis
|
|
runs-on: docker
|
|
steps:
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.x'
|
|
- uses: actions/checkout@v4
|
|
- run: |
|
|
corepack enable
|
|
yarn
|
|
yarn lint
|
|
deploy:
|
|
name: Deploy
|
|
needs: [static-analysis]
|
|
runs-on: docker
|
|
steps:
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.x'
|
|
- uses: actions/checkout@v4
|
|
- run: |
|
|
corepack enable
|
|
yarn
|
|
npx netlify-cli deploy --prod
|
|
env:
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|