code block added for different languages #5
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 and Publish to GH pages | |
on: | |
push: | |
branches: [ master ] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.12' ] | |
steps: | |
- name: Checkout and fetch submodule | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
id: python312 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies and generate HTML files | |
env: | |
PIP_DISABLE_PIP_VERSION_CHECK: on | |
PIP_NO_CACHE_DIR: off | |
run: | | |
python -m pip install -U virtualenv | |
python -m virtualenv .venv | |
python -m pip install . | |
make publish | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v3.0.1 | |
with: | |
path: "./output" | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
# environment created automatically by GitHub | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4.0.5 |