fix(actions): use FTP deploy for GitHub Actions automation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f0211e0e5c
commit
68a5d54934
1 changed files with 8 additions and 8 deletions
16
.github/workflows/update-status.yml
vendored
16
.github/workflows/update-status.yml
vendored
|
|
@ -3,7 +3,7 @@ name: Update Status Page
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "*/5 * * * *" # every 5 minutes
|
- cron: "*/5 * * * *" # every 5 minutes
|
||||||
workflow_dispatch: # manual trigger
|
workflow_dispatch: # manual trigger via GitHub UI
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
@ -28,18 +28,18 @@ jobs:
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git add public/status.json
|
git add public/status.json
|
||||||
git diff --cached --quiet || git commit -m "chore: update status $(date -u '+%Y-%m-%d %H:%M UTC')"
|
git diff --cached --quiet && echo "No changes" && exit 0
|
||||||
|
git commit -m "chore: status update $(date -u '+%Y-%m-%d %H:%M UTC')"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
- name: Deploy to Hostinger via FTP
|
- name: Deploy to Hostinger via FTP
|
||||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
||||||
with:
|
with:
|
||||||
server: ${{ secrets.FTP_SERVER }}
|
server: ${{ secrets.FTP_SERVER }}
|
||||||
username: ${{ secrets.FTP_USERNAME }}
|
username: ${{ secrets.FTP_USERNAME }}
|
||||||
password: ${{ secrets.FTP_PASSWORD }}
|
password: ${{ secrets.FTP_PASSWORD }}
|
||||||
local-dir: ./public/
|
local-dir: ./public/
|
||||||
server-dir: /public_html/
|
server-dir: /public_html/
|
||||||
dangerous-clean-slate: false
|
|
||||||
exclude: |
|
exclude: |
|
||||||
**/.git*
|
**/.git*
|
||||||
**/.git*/**
|
**/.git*/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue