From 937e79abceb63d16d3773390fab66c5c7eb411c5 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Mon, 1 Aug 2022 18:00:32 +0900 Subject: [PATCH] use actions/deploy-pages --- .github/workflows/github-pages.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index 1948992..b2679a8 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -4,7 +4,10 @@ on: branches: [main] jobs: main: - permissions: write-all + permissions: + pages: write + id-token: write + environment: github-pages runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -14,18 +17,11 @@ jobs: with: path: ${{ steps.brew_cache.outputs.dir }} key: brew-v3 - - name: Git config - run: | - git config user.name bot - git config user.email bot@example - git subtree add --prefix book origin gh-pages - name: Build run: | brew bundle mdbook build - - name: Publish - run: | - git add -f book - if git commit -m update; then - git subtree push --prefix book origin gh-pages - fi + - uses: actions/upload-pages-artifact@v1 + with: + path: book + - uses: actions/deploy-pages@v1