Rework website update workflow (#1851)

This commit is contained in:
scb261
2025-03-11 10:39:02 +02:00
committed by GitHub
parent aa6a4953c5
commit 0d19308054
2 changed files with 24 additions and 13 deletions

View File

@ -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 }}

23
.github/workflows/update_website.yml vendored Normal file
View File

@ -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"}'