diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..407da9b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +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 }} + diff --git a/.gitignore b/.gitignore index 4dcb7a1..b955719 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ node_modulesnode_modules/ + +# Local Netlify folder +.netlify