mirror of
https://github.com/kou029w/nodejs-hands-on.git
synced 2025-01-18 16:08:05 +00:00
use actions/deploy-pages
This commit is contained in:
parent
4e0d51e5db
commit
937e79abce
1 changed files with 8 additions and 12 deletions
20
.github/workflows/github-pages.yml
vendored
20
.github/workflows/github-pages.yml
vendored
|
@ -4,7 +4,10 @@ on:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
permissions: write-all
|
permissions:
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
environment: github-pages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -14,18 +17,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.brew_cache.outputs.dir }}
|
path: ${{ steps.brew_cache.outputs.dir }}
|
||||||
key: brew-v3
|
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
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
brew bundle
|
brew bundle
|
||||||
mdbook build
|
mdbook build
|
||||||
- name: Publish
|
- uses: actions/upload-pages-artifact@v1
|
||||||
run: |
|
with:
|
||||||
git add -f book
|
path: book
|
||||||
if git commit -m update; then
|
- uses: actions/deploy-pages@v1
|
||||||
git subtree push --prefix book origin gh-pages
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue