use actions/deploy-pages

This commit is contained in:
Nebel 2022-08-01 17:43:34 +09:00
parent 723fdb926b
commit 6d3d3d4730

View file

@ -4,17 +4,15 @@ on:
branches: [main] branches: [main]
jobs: jobs:
main: main:
permissions:
pages: write
id-token: write
environment: github-pages
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: build - run: npx @marp-team/marp-cli README.md -o pages/index.html
run: | - uses: actions/upload-pages-artifact@v1
git -c "user.name=bot" -c "user.email=bot@example" subtree add --prefix pages origin gh-pages with:
npx @marp-team/marp-cli README.md -o pages/index.html path: pages
- id: git_status - uses: actions/deploy-pages@v1
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