This commit is contained in:
+11
-6
@@ -1,9 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
JOB_ID="$(curl https://git.ajet.fyi/api/v1/repos/ajet-industries/blog?limit=1 -H "Content-Type: application/json" | jq '.id)'
|
set -ve
|
||||||
|
|
||||||
rm -rf /var/www/html/*
|
JOB_URL=$(curl https://git.ajet.fyi/api/v1/repos/ajet-industries/blog/actions/tasks | jq '.workflow_runs[0].url' -r)
|
||||||
curl https://git.ajet.fyi/ajet-industries/blog/actions/runs/9/artifacts/blog --output /var/www/html
|
echo $JOB_URL
|
||||||
unzip /var/www/html/blog
|
ARTIFACT_URL="$JOB_URL/artifacts/blog"
|
||||||
rm /var/www/html/blog
|
echo $ARTIFACT_URL
|
||||||
systemctl restart nginx
|
rm /var/www/html/* -rf || echo "files not found to delete"
|
||||||
|
cd /var/www/html
|
||||||
|
curl $ARTIFACT_URL --output blog
|
||||||
|
unzip blog
|
||||||
|
rm blog
|
||||||
|
systemctl restart nginx
|
||||||
Reference in New Issue
Block a user