nodejs-hands-on/.github/workflows/github-pages.yml

27 lines
628 B
YAML

name: github-pages
on:
push:
branches: [main]
jobs:
main:
permissions:
pages: write
id-token: write
environment: github-pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: brew_cache
run: echo "::set-output name=dir::$(brew --cache)"
- uses: actions/cache@v3
with:
path: ${{ steps.brew_cache.outputs.dir }}
key: brew-v3
- name: Build
run: |
brew bundle
mdbook build
- uses: actions/upload-pages-artifact@v1
with:
path: book
- uses: actions/deploy-pages@v1