mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
feat: add Docker configuration files and self-deployment workflow
This commit is contained in:
parent
e081c54624
commit
50846c91c2
4 changed files with 84 additions and 0 deletions
34
.github/workflows/self_deploy.yml
vendored
Normal file
34
.github/workflows/self_deploy.yml
vendored
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue