mirror of
https://github.com/kou029w/jest-hands-on.git
synced 2025-01-31 22:08:00 +00:00
use actions/deploy-pages
This commit is contained in:
parent
5263a4ef9c
commit
2c3d509506
1 changed files with 8 additions and 11 deletions
19
.github/workflows/github-pages.yml
vendored
19
.github/workflows/github-pages.yml
vendored
|
@ -7,6 +7,10 @@ on:
|
|||
jobs:
|
||||
main:
|
||||
if: github.event.workflow_run.conclusion == 'success'
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
environment: github-pages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -16,18 +20,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
|
||||
|
|
Loading…
Add table
Reference in a new issue