From e8f9e5a498be92e2c5d9101b818245db21c3fc97 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Tue, 17 Jan 2023 13:36:29 -0700 Subject: [PATCH] Use official deploy-pages action --- .github/workflows/build.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73b4f92f..20ed2389 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ on: - cron: '0 * */1 * *' jobs: - Init: + Build: runs-on: ubuntu-latest steps: - name: Clone Tree @@ -24,9 +24,20 @@ jobs: cssmin > dist/theme.css.min < dist/theme.css mv dist/theme.css.min dist/theme.css echo "xemu.app" > dist/CNAME - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + - uses: actions/upload-pages-artifact@v1 + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/heads/master') with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist - force_orphan: true + path: dist + Deploy: + needs: [build] + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/heads/master') + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v1.2.3