Merge pull request #115 from thedataquarry/pre-commit-ci-update-config #193
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy mdBook to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: write | |
env: | |
CUSTOM_DOMAIN: rustinpieces.dev | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup mdBook | |
uses: peaceiris/actions-mdbook@v1 | |
with: | |
mdbook-version: latest | |
- run: | | |
touch book/.nojekyll | |
cd book | |
mdbook test | |
mdbook build | |
- name: Create CNAME file | |
run: | | |
echo "$CUSTOM_DOMAIN" > ./book/book/CNAME | |
echo "Created CNAME in ./book/book/CNAME: $CUSTOM_DOMAIN" | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: "./book/book" |