mirror of
https://github.com/ow-mods/ow-mod-db.git
synced 2025-12-11 20:15:24 +01:00
Deploy to pages in same workflow as updating database (#646)
* deploy to gh pages as part of workflow * Update mods.json * fix action path * Update mods.json * use provided gh token * fix artifact upload folder * set token permissions * fix commit permissions * Cleanup
This commit is contained in:
parent
dd749fcb70
commit
08926b6597
24
.github/workflows/update-releases.yml
vendored
24
.github/workflows/update-releases.yml
vendored
@ -1,5 +1,7 @@
|
||||
name: Update Releases
|
||||
|
||||
concurrency: update-releases
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "*/5 * * * *"
|
||||
@ -9,6 +11,12 @@ on:
|
||||
- source
|
||||
paths:
|
||||
- "mods.json"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@ -58,7 +66,7 @@ jobs:
|
||||
id: fetch-mods
|
||||
uses: ./fetch-mods
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
discord-mod-hook-urls: ${{ secrets.DISCORD_MOD_HOOK_URLS }}
|
||||
mods: "${{ env.mods_output }}"
|
||||
out-directory: database
|
||||
@ -67,11 +75,21 @@ jobs:
|
||||
discord-new-mod-role-id: "${{ secrets.DISCORD_NEW_MOD_ROLE_ID }}"
|
||||
google-service-account: "${{ secrets.GOOGLE_SERVICE_ACCOUNT }}"
|
||||
|
||||
- name: Upload Pages Artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: database
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: actions/deploy-pages@v1
|
||||
with:
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Commit changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
branch: "master"
|
||||
repository: "database"
|
||||
branch: master
|
||||
repository: database
|
||||
commit_message: Update mod database
|
||||
commit_user_name: Outer Wilds Mod Database
|
||||
commit_user_email: database@outerwildsmods.com
|
||||
|
||||
@ -155,7 +155,7 @@ async function run() {
|
||||
);
|
||||
|
||||
sendDiscordNotifications(
|
||||
core.getInput(Input.discordHookUrl),
|
||||
discordHookUrl,
|
||||
core.getInput(Input.discordModUpdateRoleId),
|
||||
core.getInput(Input.discordNewModRoleId),
|
||||
diff,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user