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 Astro to cPanel | |
on: | |
push: | |
branches: [ main ] # ou master, selon votre branche principale | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm install | |
- name: Build Astro site | |
run: npm run build | |
- name: 📂 Sync files to cPanel | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.CPANEL_SERVER }} | |
username: ${{ secrets.CPANEL_USERNAME }} | |
password: ${{ secrets.CPANEL_PASSWORD }} | |
local-dir: ./dist/ | |
server-dir: / |