Skip to content

chore(ci): refactor install mdbook code (#14) #6

chore(ci): refactor install mdbook code (#14)

chore(ci): refactor install mdbook code (#14) #6

Workflow file for this run

name: Deploy book
on:
push:
branches: [ "master" ]
jobs:
test:
runs-on: ubuntu-latest
name: test
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-mdbook
- name: Run tests
run: mdbook test
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-mdbook
- name: Build book
run: mdbook build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "target/book"
retention-days: 1
deploy:
runs-on: ubuntu-latest
needs: [build]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Permissions needed to deploy to GitHub Pages
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4