Merge pull request #12 from csmith763/main #125
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 deploy webpage | |
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: write | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- 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 | |
mkdir external | |
cd external | |
git clone https://github.com/smdogroup/sphinxcontrib-geogebra.git | |
cd sphinxcontrib-geogebra | |
python setup.py build | |
python setup.py install --user | |
cd ../.. | |
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/html' | |
# | |
- name: Push artifact to pages-artifact branch | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: pages-artifact | |
FOLDER: './docs/build/html' | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MESSAGE: "Build: ({sha}) {msg}" # The commit message | |
# 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 |