update fefd code #763
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: docs | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "1 9 * * *" | |
jobs: | |
build: | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Date | |
id: get-date | |
run: | | |
echo "date=$(/bin/date --date='TZ="America/Los_Angeles"' -u "+%Y%m%d")" >> $GITHUB_OUTPUT | |
cat $GITHUB_OUTPUT | |
- uses: actions/checkout@v3 | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
activate-environment: env | |
use-mamba: true | |
- name: Add conda to system path | |
run: | | |
echo $CONDA/bin >> $GITHUB_PATH | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.3.2 | |
virtualenvs-create: false | |
installer-parallel: true | |
- name: Install dependencies | |
run: | | |
sudo apt-get install -y libglu1-mesa | |
poetry install --no-interaction | |
mamba install slepc4py=*=complex* -y | |
mamba install julia | |
pip install jupyter-book | |
pip install --upgrade jupytext | |
pip install sphinx=="5.3.0" | |
pip install docutils=="0.17.1" | |
pip list | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1.9.2' | |
- uses: julia-actions/cache@v1 | |
- uses: julia-actions/julia-buildpkg@v1 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
docs/_build/.jupyter_cache | |
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ github.run_id }} | |
restore-keys: | | |
${{ runner.os }}-${{ steps.get-date.outputs.date }} | |
- name: Make docs | |
run: | | |
jupyter-book build docs/ | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: './docs/_build/html/' | |
deploy: | |
if: ${{ github.repository == 'HelgeGehring/femwell' && github.ref == 'refs/heads/main' }} # skip for forks / branches | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |
#trigger-binder-build: | |
# runs-on: [ubuntu-latest] | |
# steps: | |
# - uses: s-weigand/trigger-mybinder-build@v1 | |
# with: | |
# target-repo: HelgeGehring/femwell | |
# target-state: HEAD | |
# service-name: gh | |
# debug: true |