Skip to content

refactor: update image links in LatestPosts component and remove unus… #30

refactor: update image links in LatestPosts component and remove unus…

refactor: update image links in LatestPosts component and remove unus… #30

name: Deploy to Netlify
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Install Netlify CLI
run: npm install -g netlify-cli
- name: Deploy to Netlify
run: netlify deploy --prod --build
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NEXT_PUBLIC_NETLIFY: "true" # Optional but recommended
- name: Cache Next.js build
uses: actions/cache@v3
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}