From 4c54294074f9b0f8912c8fbd1cd7011b803b45de Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sat, 19 Apr 2025 21:22:43 +1000 Subject: [PATCH 1/2] deploy website on release --- .github/workflows/website_deploy.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/website_deploy.yml diff --git a/.github/workflows/website_deploy.yml b/.github/workflows/website_deploy.yml new file mode 100644 index 00000000000..0cb6231740f --- /dev/null +++ b/.github/workflows/website_deploy.yml @@ -0,0 +1,21 @@ +--- + +name: Deploy Website On Release +on: + release: + types: [published] + workflow_dispatch: + +jobs: + dispatch: + runs-on: ubuntu-latest + steps: + - name: Dispatch event + run: | + http_status=$(curl -L -f -s -o /dev/null -w "%{http_code}" \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.DEPLOY_WEBSITE }}" \ + https://api.github.com/repos/Flow-Launcher/flow-launcher.github.io/dispatches \ + -d '{"event_type":"deploy"}') + if [ "$http_status" -ne 204 ]; then echo "Error: Deploy trigger failed, HTTP status code is $http_status"; exit 1; fi From 827c7520f9d011583ab135ce1e65fb086d94925d Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sat, 19 Apr 2025 21:27:24 +1000 Subject: [PATCH 2/2] update token name --- .github/workflows/website_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/website_deploy.yml b/.github/workflows/website_deploy.yml index 0cb6231740f..2d44e4a2c78 100644 --- a/.github/workflows/website_deploy.yml +++ b/.github/workflows/website_deploy.yml @@ -15,7 +15,7 @@ jobs: http_status=$(curl -L -f -s -o /dev/null -w "%{http_code}" \ -X POST \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.DEPLOY_WEBSITE }}" \ + -H "Authorization: Bearer ${{ secrets.DEPLOY_FLOW_WEBSITE }}" \ https://api.github.com/repos/Flow-Launcher/flow-launcher.github.io/dispatches \ -d '{"event_type":"deploy"}') if [ "$http_status" -ne 204 ]; then echo "Error: Deploy trigger failed, HTTP status code is $http_status"; exit 1; fi