apush-guide/.gitea/workflows/build-serve.yml

31 lines
630 B
YAML
Raw Normal View History

2024-10-08 12:43:10 -04:00
name: github pages
2024-10-08 12:35:50 -04:00
on:
push:
branches:
2024-10-08 12:37:29 -04:00
- main
2024-10-08 12:43:10 -04:00
pull_request:
2024-10-08 12:35:50 -04:00
jobs:
2024-10-08 12:43:10 -04:00
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
2024-10-08 12:35:50 -04:00
steps:
2024-10-08 12:43:10 -04:00
- uses: actions/checkout@v2
2024-10-08 12:35:50 -04:00
2024-10-08 12:43:10 -04:00
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: '0.4.10'
# mdbook-version: 'latest'
2024-10-08 12:35:50 -04:00
2024-10-08 12:43:10 -04:00
- run: mdbook build
2024-10-08 12:35:50 -04:00
2024-10-08 12:37:29 -04:00
- name: Deploy
2024-10-08 12:43:10 -04:00
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book