feat: add Docker configuration files and self-deployment workflow

This commit is contained in:
yuanhau 2025-05-09 22:49:45 +08:00
parent e081c54624
commit 50846c91c2
4 changed files with 84 additions and 0 deletions

34
.github/workflows/self_deploy.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: Server Deployment Request
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
env:
DEPLOY_URL: ${{ secrets.DEPLOY_URL }}
steps:
- name: Send deployment request
id: deploy-request
run: |
echo "Sending deployment request to server..."
RESPONSE=$(curl -X POST \
-H "Content-Type: application/json" \
--http1.1 \
--fail \
--silent \
--show-error \
"${{ secrets.DEPLOY_URL }}" || echo "Failed to send request")
if [ $? -eq 0 ]; then
echo "Deployment request sent successfully"
echo "Response: $RESPONSE"
else
echo "Error sending deployment request"
exit 1
fi