Skip to content

Commit

Permalink
Deploy to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
SnO2WMaN committed Jul 25, 2024
1 parent 0c8effd commit 6d58ebd
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches:
- "main"
pull_request:
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build Book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install mdbook
uses: baptiste0928/cargo-install@v3
with:
crate: mdbook
version: "0.4.40"
- name: Install mdbook-katex
uses: baptiste0928/cargo-install@v3
with:
crate: mdbook-katex
version: "0.9.0"
- name: Print mdbook and plugins version
run: |
mdbook --version
mdbook-katex --version
- run: mdbook build md
- name: Run Link Checker
uses: lycheeverse/lychee-action@v1
with:
args: --base book .

- name: Upload mdbook
uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/main'
with:
name: book
path: ./book

deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs:
- build
steps:
- uses: actions/deploy-pages@v4
id: deployment

0 comments on commit 6d58ebd

Please sign in to comment.