From 4dc3034d510009e57e221c97a3562541d33fd271 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Mon, 1 Aug 2022 17:43:20 +0900 Subject: [PATCH] use actions/deploy-pages --- .github/workflows/github-pages.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index 0889af8..47c0294 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -4,23 +4,20 @@ on: branches: [main] jobs: main: + permissions: + pages: write + id-token: write + environment: github-pages runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: { node-version: lts/*, cache: yarn } - - name: Git config - run: | - git config user.name bot - git config user.email bot@example - git subtree add --prefix pages origin gh-pages - name: Build run: | yarn install yarn build - - name: Publish - run: | - git add -f pages - if git commit -m update; then - git subtree push --prefix pages origin gh-pages - fi + - uses: actions/upload-pages-artifact@v1 + with: + path: pages + - uses: actions/deploy-pages@v1