75
75
NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
76
76
timeout-minutes : 1
77
77
78
- publish-hidora :
79
- name : Deploy to Docker Hub & Hidora
78
+ publish-scaleway :
79
+ name : Deploy to Docker Hub & Scaleway
80
80
if : github.event_name != 'pull_request'
81
81
runs-on : ubuntu-latest
82
82
container : httptoolkit/act-build-base
@@ -108,28 +108,27 @@ jobs:
108
108
type=raw,value=latest,enable={{is_default_branch}}
109
109
type=sha
110
110
111
- - name : Deploy to Docker Hub
111
+ - name : Publish to Docker Hub
112
112
uses : docker/build-push-action@v2
113
113
with :
114
114
context : .
115
115
push : ${{ github.event_name != 'pull_request' }}
116
116
tags : ${{ steps.meta.outputs.tags }}
117
117
labels : ${{ steps.meta.outputs.labels }}
118
118
119
- - name : Redeploy site
119
+ - name : Redeploy container
120
+ uses : thibaultchazal/scaleway-serverless-container-deploy-action@0d290edda0c3359e51442bd8bf730eafef4e290f
121
+ with :
122
+ container_id : ${{ vars.SCW_API_CONTAINER_ID }}
123
+ secret_key : ${{ secrets.SCW_SECRET_KEY }}
124
+ registry_image_url : " registry.hub.docker.com/httptoolkit/ui:prod"
125
+
126
+ - name : Flush CDN cache
120
127
if : github.event_name == 'push' && github.ref == 'refs/heads/main'
121
128
run : |
122
- sleep 30 # Wait for Docker Hub to fully publish
123
-
124
- # Trigger a container redeploy:
125
- curl "https://app.hidora.com/1.0/environment/control/rest/redeploycontainersbygroup?session=$HIDORA_API_TOKEN&envName=htk-ui&nodeGroup=cp&tag=prod&useExistingVolumes=true" | \
126
- tee /dev/stderr | \
127
- grep -q 'Node has been successfully updated'
128
-
129
129
# Clear CDN cache to re-request content:
130
130
curl -f --request POST \
131
131
--url https://api.bunny.net/pullzone/1110200/purgeCache \
132
132
--header "AccessKey: $BUNNY_SITE_API_KEY"
133
133
env :
134
- HIDORA_API_TOKEN : ${{ secrets.HIDORA_API_TOKEN }}
135
134
BUNNY_SITE_API_KEY : ${{ secrets.BUNNY_SITE_API_KEY }}
0 commit comments