Control opt_main pipeline with a proto #16
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: Continuous Docs Deployment | |
on: | |
# Run on every commit pushed to main. | |
push: | |
branches: | |
- main | |
# This will skip deploy per step 5 of https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#creating-a-custom-github-actions-workflow-to-publish-your-site). | |
pull_request: | |
branches: | |
- main | |
# This lets us trigger manually from the UI. | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: | |
labels: ubuntu-22.04-4core | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- name: Install Python dependencies | |
run: | | |
pip install --upgrade pip | |
pip install mkdocs mkdocs-gen-files mkdocs-material mkdocs-exclude mkdocs-print-site-plugin mdx_truly_sane_lists | |
- name: Build MkDocs And Commit HTML | |
run: | | |
mkdocs build | |
- name: Upload static files as artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/ | |
deploy: | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: | |
labels: ubuntu-22.04-4core | |
needs: build | |
if: github.event_name == 'push' | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |