Draft documentation and action #2
This file contains hidden or 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 docs | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'docs/**' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install MkDocs | |
| run: pip install mkdocs-material | |
| - name: Build Documentation | |
| run: | | |
| mkdocs build -f docs/en/mkdocs.yml -d site/ | |
| for lang in ru es de fr; do | |
| mkdocs build -f docs/$lang/mkdocs.yml -d site/$lang | |
| done | |
| - name: Write CNAME | |
| run: echo 'fastopenapi.fatalyst.dev' > site/CNAME | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./site |