From 5e0e29ae8e8f7eb527baf13bbcb13c127cc9cc01 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Mon, 1 Aug 2022 17:43:29 +0900 Subject: [PATCH] use actions/deploy-pages --- .github/workflows/github-pages.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index 0d9909b..1c0dd40 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -4,17 +4,15 @@ on: branches: [main] jobs: main: + permissions: + pages: write + id-token: write + environment: github-pages runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: build - run: | - git -c "user.name=bot" -c "user.email=bot@example" subtree add --prefix pages origin gh-pages - npx @marp-team/marp-cli README.md -o pages/index.html - - id: git_status - run: echo "::set-output name=mod::$(git status pages --porcelain)" - - name: push - if: steps.git_status.outputs.mod != '' - run: | - git -c "user.name=bot" -c "user.email=bot@example" commit -a -m update - git subtree push --prefix pages origin gh-pages + - run: npx @marp-team/marp-cli README.md -o pages/index.html + - uses: actions/upload-pages-artifact@v1 + with: + path: pages + - uses: actions/deploy-pages@v1