Publication documentation in branch gh-pages from branch >> main << #10
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: Publication documentation in branch gh-pages | |
run-name: Publication documentation in branch gh-pages from branch >> ${{ github.ref_name }} << | |
# this workflow will trigger the pages-build-deployment workflow that will deploy the branch gh-pages to github pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'docs/**' | |
jobs: | |
generate_and_deploy_documentation: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install mkdocs | |
run: pip install mkdocs-material | |
- name: build documentation in site folder | |
run: mkdocs build | |
- name: Deploy site folder to GitHub Pages | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v3 | |
with: | |
target_branch: gh-pages | |
build_dir: site | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |