Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sef43 committed Nov 8, 2023
1 parent d2a9602 commit c588a99
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 127 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/docs_website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Documentation website

on:
workflow_dispatch:
push:
branches:
- main
release:
types: [published]


jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{hashFiles('environment.yml') }}

- uses: conda-incubator/setup-miniconda@v2
name: Install dependencies
with:
environment-file: doc/environment.yml
auto-activate-base: false
miniforge-version: latest
miniforge-variant: Mambaforge
use-mamba: true

- name: Describe environment
run: |
pwd
ls
conda list
- name: Install openmm-ml
run: |
pip install .
- name: Build Sphinx documentation
run: |
cd doc
make html
- name: Checkout gh-pages
if: success()
uses: actions/checkout@v2
with:
ref: gh-pages
path: 'deploy'
clean: false

- name: Prepare development deployment
if: success() && github.event_name == 'push'
run: |
rm -rf deploy/dev
mv doc/build/html deploy/dev
- name: Prepare release deployment
if: success() && github.event_name == 'release'
run: |
rm -rf deploy/${{ github.ref_name }}
mkdir -p deploy/${{ github.ref_name }}
mv -T doc/build/html deploy/${{ github.ref_name }}
rm -rf deploy/latest
ln -s ${{ github.ref_name }} deploy/latest
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: deploy
jekyll: false
commit_message: "Deploy to GH Pages"
keep_history: true
follow_symlinks: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

127 changes: 0 additions & 127 deletions .github/workflows/website.yml

This file was deleted.

0 comments on commit c588a99

Please sign in to comment.