diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index fa1dd2f66..047064f78 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -120,16 +120,4 @@ jobs: mihon-x86_64-${{ env.VERSION_TAG }}.apk draft: true prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Update website - if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mihonapp/mihon' - run: | - curl -L \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.MIHON_BOT_TOKEN }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/mihonapp/website/dispatches \ - -d '{"event_type":"app_release"}' + token: ${{ secrets.MIHON_BOT_TOKEN }} diff --git a/.github/workflows/update_website.yml b/.github/workflows/update_website.yml new file mode 100644 index 000000000..452d2e438 --- /dev/null +++ b/.github/workflows/update_website.yml @@ -0,0 +1,23 @@ +name: Update website + +on: + release: + types: + - published + - deleted + - edited + +jobs: + update_website: + runs-on: 'ubuntu-24.04' + + steps: + - name: Update website + run: | + curl --fail-with-body -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.MIHON_BOT_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/mihonapp/website/dispatches \ + -d '{"event_type":"app_release"}'