v3 #105
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: deploy gh-pages | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
# - name: Install mamba | |
# uses: mamba-org/setup-micromamba@v1 | |
# with: | |
# micromamba-version: '2.0.0-0' # any version from https://github.com/mamba-org/micromamba-releases | |
# environment-file: environment.yml | |
# init-shell: bash | |
- name: Build site | |
run: | | |
source $CONDA/etc/profile.d/conda.sh; | |
echo $CONDA/bin >> $GITHUB_PATH; | |
conda create -n smdopage python=3.11 | |
conda activate smdopage | |
conda install mamba=1.5.10 -c conda-forge | |
conda install libmamba -c conda-forge | |
pip install -r docs/source/requirements.txt | |
conda --version | |
mamba --version | |
empack --version | |
sphinx-build -M html "docs/source" "docs/build" | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./docs/build | |
# | |
# - name: Push changes | |
# uses: ad-m/github-push-action@master | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# branch: gh-pages | |
# | |
# - name: Debug | |
# if: ${{ failure() }} | |
# uses: mxschmitt/action-tmate@v3 | |
# | |
deploy: | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |