mirror of
https://github.com/kou029w/nodejs-hands-on.git
synced 2025-01-18 16:08:05 +00:00
32 lines
797 B
YAML
32 lines
797 B
YAML
|
name: github-pages
|
||
|
on:
|
||
|
push:
|
||
|
branches: [main]
|
||
|
jobs:
|
||
|
main:
|
||
|
permissions: write-all
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- id: brew_cache
|
||
|
run: echo "::set-output name=dir::$(brew --cache)"
|
||
|
- uses: actions/cache@v2
|
||
|
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
|