use actions/deploy-pages

This commit is contained in:
Nebel 2022-08-01 17:43:20 +09:00
parent 396a0aa8b6
commit 4dc3034d51

View file

@ -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