🔬 test: cpanel deployment every month

This commit is contained in:
RiO
2024-12-29 06:10:09 +05:30
parent 11fa90eb9c
commit 67ddaa4a2c

33
.github/workflows/deploy-cpanel.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Deploy React to cPanel via FTP
on:
schedule:
# Runs at midnight UTC on the 1st day of every month
- cron: '0 0 1 * *'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install Dependencies
run: npm install
- name: Build React App
run: npm run build
- name: Deploy to cPanel via FTP
run: |
curl -s ftp://$FTP_SERVER --user $FTP_USER:$FTP_PASSWORD --upload-file ./dist/* --ftp-create-dirs
env:
FTP_SERVER: ${{ secrets.FTP_SERVER }}
FTP_USER: ${{ secrets.FTP_USER }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}