Publish Code examples Docs #6935
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: Publish Code examples Docs | |
on: | |
schedule: | |
- cron: "39 * * * *" | |
push: | |
#branches: ["master"] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build-and-deploy: | |
concurrency: ci-${{ github.ref }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
extended: true | |
hugo-version: '0.109.0' | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: 'pip' | |
- name: generate examples index | |
run: | | |
make deps build docs | |
mkdocs build -d docsbuild | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: 'docsbuild' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |