diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..4370bc8 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,40 @@ +name: github pages + +on: + push: + branches: + - main + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-22.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Build Book + run: docker run --rm -v .:/book eliyip/mdbook-katex:latest-slim + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: "book" + + deploy: + runs-on: ubuntu-22.04 + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4