Skip to content

test 2

test 2 #12

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main # Avvia il deploy quando ci sono modifiche su "main"
permissions:
contents: write # Autorizzazione per scrivere sui contenuti
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Set permissions for Vite
run: chmod +x ./node_modules/.bin/vite
- name: Clear dist folder
run: |
rm -rf dist/* assets/*
- name: Build project
run: npm run build
- name: Move build files to root
run: |
mv dist/* .
shell: bash
- name: Commit and Push to Main
run: |
git config --global user.email "lollo176ita@gmail.com"
git config --global user.name "GitHub Actions"
git add .
git commit -m "Deploy to GitHub Pages"
git push origin main --force