Automated deployment
Some checks failed
Build and Test / determine_version (push) Successful in 9s
Build and Test / build_and_push (push) Successful in 1m6s
Build and Test / test (push) Successful in 1s
Build and Test / deploy_production (push) Failing after 2s

This commit is contained in:
2025-03-31 15:28:57 -07:00
parent d860a03aaa
commit cd397b1d15

View File

@@ -70,8 +70,9 @@ jobs:
test:
runs-on: ubuntu-latest
needs: build_and_push
steps:
- run: echo "Tests would go here"
- run: echo "Placeholder"
# - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
# - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
# - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
@@ -82,4 +83,38 @@ jobs:
# - name: List files in the repository
# run: |
# ls ${{ gitea.workspace }}
# - run: echo "🍏 This job's status is ${{ job.status }}."
# - run: echo "🍏 This job's status is ${{ job.status }}."
deploy_production:
runs-on: ubuntu-latest
needs: test
steps:
- name: Pull New Image For App
run: |
curl -k -X 'POST' \
'https://caperren.com:444/api/v2.0/app/pull_images' \
-H 'accept: */*' \
-H 'Authorization: Bearer ${{ secrets.TRUENAS_CAPERRENCOM_API_KEY }}' \
-H 'Content-Type: application/json' \
-d '{
"name": "caperren-com",
"options": {}
}'
- name: Stop App
run: |
curl -X 'POST' \
'https://caperren.com:444/api/v2.0/app/stop' \
-H 'accept: */*' \
-H 'Authorization: Bearer ${{ secrets.TRUENAS_CAPERRENCOM_API_KEY }}' \
-H 'Content-Type: application/json' \
-d '"caperren-com"' \
|| true
- name: Stop Existing App
- name: Start App
run: |
curl -X 'POST' \
'https://caperren.com:444/api/v2.0/app/stop' \
-H 'accept: */*' \
-H 'Authorization: Bearer ${{ secrets.TRUENAS_CAPERRENCOM_API_KEY }}' \
-H 'Content-Type: application/json' \
-d '"caperren-com"' \
|| true