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 - uses: Homebrew/actions/setup-homebrew@master - 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