diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..2840017 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,58 @@ +name: github pages + +on: + push: + branches: + - main + pull_request: + +jobs: + deploy: + runs-on: ubuntu-24.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v2 + + - name: Install mdbook + uses: peaceiris/actions-mdbook@v2 + with: + mdbook-version: '0.4.52' + + - name: Install mdbook-bib + uses: baptiste0928/cargo-install@v3 + with: + crate: mdbook-bib + version: '=0.0.7' + locked: true + + - name: Install mdbook-mermaid + uses: baptiste0928/cargo-install@v3 + with: + crate: mdbook-mermaid + version: '=0.16.0' + locked: true + + - name: Install mdbook-pagetoc + uses: baptiste0928/cargo-install@v3 + with: + crate: mdbook-pagetoc + version: '=0.2.2' + locked: true + + - name: Install mdbook-tera + uses: baptiste0928/cargo-install@v3 + with: + crate: mdbook-tera + version: '=0.6.0' + locked: true + + - name: Build + run: mdbook build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./book diff --git a/.github/workflows/push-main.yml b/.github/workflows/push-main.yml deleted file mode 100644 index bb03210..0000000 --- a/.github/workflows/push-main.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Push to main - -on: - push: - branches: - - main - -permissions: - id-token: write - pages: write - -jobs: - push: - runs-on: ubuntu-latest - - steps: - - name: Pandoc specification builder - uses: legreq/pandoc-spec@main - with: - include-repository: true - include-pages: true