Update docs.yaml #21
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: Build experimental docs | |
on: | |
push: | |
branches: | |
- main | |
- jcannon/documentation | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build_docs: | |
name: Build Experimental Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
ref: jcannon/documentation | |
- name: Merge docs branch | |
run: | | |
git config --global user.email "joshdcannon@gmail.com" | |
git config --global user.name "Joshua Cannon" | |
git merge main | |
- name: Convert docs | |
run: | | |
docs/convert.sh | |
- name: Build docs | |
run: | | |
# Not using Pants because I wanna go Sanic fast | |
pip install mkdocs mkdocs-material mkdocs-redirects | |
mkdocs build -f docs/mkdocs.yml | |
mkdir -p dist/site | |
mv docs/site dist/site/docs | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: dist/site | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |