Skip to content

Merge pull request #447 from bookstore-README/fic/#438 #211

Merge pull request #447 from bookstore-README/fic/#438

Merge pull request #447 from bookstore-README/fic/#438 #211

Workflow file for this run

name: Build, Lint, and Deploy Workflow
on:
push:
branches:
- develop
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Run ESLint
run: npm run lint
build:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Build Project
run: npm run build
deploy_vercel:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy to Vercel
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-project-id: ${{secrets.PROJECT_ID}}
vercel-org-id: ${{secrets.ORG_ID}}
notify_discord:
runs-on: ubuntu-latest
needs: deploy_vercel
if: failure()
steps:
- name: Send Discord Notification
uses: appleboy/discord-action@master
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
message: '${{ github.actor }}님, 빌드에러가 발생했습니다. 확인 부탁드려요!'
push_to_forked_repository:
runs-on: ubuntu-latest
needs: deploy_vercel
if: github.ref == 'refs/heads/develop' && success()
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Push to Forked Repository
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git remote add forked_repo https://github.com/thisisthewa2/front_bookstore-README.git
git push forked_repo develop