updates for database builder executable #799
Workflow file for this run
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 Documentation | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
docs: | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.11"] | |
include: | |
- os: ubuntu-latest | |
label: linux-64 | |
prefix: /usr/share/miniconda3/envs/flood_adapt_docs | |
name: ${{ matrix.label }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Miniforge3 | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
miniforge-variant: Miniforge3 | |
miniforge-version: latest | |
use-mamba: true | |
- name: Setup env | |
run: | | |
pip install tomli | |
mamba env create --file=docs/environment_docs.yml | |
mamba run -n floodadapt_docs pip install . --no-deps | |
VERSION=$(mamba run -n floodadapt_docs python -c "from flood_adapt import __version__; print(__version__)") | |
echo "DOC_VERSION=${VERSION}" >> $GITHUB_ENV | |
- name: Setup Quarto | |
run: | | |
sudo apt update | |
sudo apt install -y curl gdebi-core | |
mkdir -p tmp | |
curl -L https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.450/quarto-1.3.450-linux-amd64.deb --output tmp/quarto.deb | |
sudo gdebi -n tmp/quarto.deb | |
- name: Generate docs | |
run: | | |
export PATH=/usr/share/miniconda3/bin:$PATH | |
source /usr/share/miniconda/etc/profile.d/conda.sh | |
mamba run -n floodadapt_docs quarto render docs/ --execute | |
- name: Upload to GitHub Pages | |
if: ${{ github.event_name != 'pull_request' && !github.event.act }} | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/_site | |
#destination_dir: ./${{ env.DOC_VERSION }} | |
keep_files: false | |
full_commit_message: Deploy ${{ env.DOC_VERSION }} to GitHub Pages |