diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index 60512fe3..04d9fa40 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -51,7 +51,7 @@ jobs: - name: Checkout preview branch uses: actions/checkout@v2 with: - repository: 'Suwayomi/Tachidesk-WebUI-preview' + repository: "Suwayomi/Tachidesk-WebUI-preview" ref: main path: preview token: ${{ secrets.DEPLOY_PREVIEW_TOKEN }} @@ -78,4 +78,24 @@ jobs: artifacts: "master/buildZip/*" owner: "Suwayomi" repo: "Tachidesk-WebUI-preview" - tag: ${{ steps.GenTagName.outputs.value }} \ No newline at end of file + tag: ${{ steps.GenTagName.outputs.value }} + + - name: Checkout github pages repo + uses: actions/checkout@v2 + with: + repository: "Tachidesk-WebUI-preview/tachidesk-webui-preview.github.io" + ref: main + path: gh-pages + token: ${{ secrets.DEPLOY_PREVIEW_TOKEN }} + + - name: Deploy github pages + run: | + TAG="${{ steps.GenTagName.outputs.value }}" + rm -rf gh-pages/* + cp master/build/* gh-pages + cd gh-pages + git add -A + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + git commit -m "Updated to $TAG" + git push origin main