ci/workflow refactor to netlify cloud #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: Deploy website | |
on: [push] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Repository Checkout | |
uses: actions/checkout@v4 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "npm" | |
- name: Install Netlify | |
run: npm install netlify-cli@17.10.1 -g | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build | |
- name: Deploy to Netlify | |
id: netlify_deploy | |
run: | | |
netlify deploy \ | |
--dir dist \ | |
--site ${{ secrets.NETLIFY_SITE_ID }} \ | |
--auth ${{ secrets.NETLIFY_API_TOKEN }} |