Netlify Deploy #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Netlify Deploy | |
on: | |
pull_request: | |
branches: | |
- main | |
types: [closed] | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Node Init | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install Netlify | |
run: | | |
npm install netlify-cli -g \ | |
npm install @netlify/plugin-nextjs -g | |
- name: Install Dependencies | |
run: npm ci | |
- name: Deploy to Netlify | |
if: ${{ success() }} | |
run: | | |
netlify deploy --build \ | |
--site ${{ secrets.NETLIFY_SITE_ID }} \ | |
--auth ${{ secrets.NETLIFY_DEPLOY_KEY }} \ | |
--message ${{ github.event.pull_request.title }} \ | |
--prod | |