Skip to content

Commit

Permalink
add: github action - deploy.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
netpyoung committed Jan 12, 2024
1 parent a9ad24f commit 5cf8a98
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and deploy GH Pages

## ref: https://github.com/peaceiris/actions-mdbook

on:
push:
branches:
- main

jobs:
build:
name: Publish site
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
- name: Build mdBook
run: |
mdbook build
touch ./book/.nojekyll
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book

0 comments on commit 5cf8a98

Please sign in to comment.