Skip to content

Commit

Permalink
feat: updated book action
Browse files Browse the repository at this point in the history
  • Loading branch information
casperstorm committed Mar 20, 2024
1 parent 9ac4f03 commit 1051db3
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 25 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/gh-page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Github Pages

on:
push:
branches:
- main
tags:
- '*'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'

- run: mdbook build book

- name: Set output directory
run: |
OUTDIR=$(basename ${{ github.ref }})
echo "OUTDIR=$OUTDIR" >> $GITHUB_ENV
- name: Deploy stable
uses: peaceiris/actions-gh-pages@v3
if: startswith(github.ref, 'refs/tags/')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book
destination_dir: ./${{ env.OUTDIR }}
25 changes: 0 additions & 25 deletions .github/workflows/publish-book.yml

This file was deleted.

0 comments on commit 1051db3

Please sign in to comment.