Skip to content

Commit

Permalink
πŸš€ Create netlify-cd.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
zetaraku committed Jun 26, 2024
1 parent c0700fd commit 7600687
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/netlify-cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy to Netlify

on:
# Runs on pushes targeting the default branch
push:
branches:
- "master"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allow one concurrent deployment
concurrency:
group: "netlify"
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: production
url: ${{ steps.netlify_deploy.outputs.NETLIFY_LIVE_URL }}
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Deploy to Netlify
uses: zetaraku/netlify-actions/cli@master
with:
args: deploy --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
id: netlify_deploy

0 comments on commit 7600687

Please sign in to comment.