Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cookbook_pr_closed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Clean up PR cache
shell: bash -l {0}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/cookbook_pr_opened.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,22 @@ on:
branches:
- main

defaults:
run:
shell: bash -l {0}

jobs:
preprocess:
runs-on: ubuntu-latest

steps:
- name: Checkout deployment branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: _cookbook_data_main
clean: false

- name: Copy cache from main to PR branch
shell: bash -l {0}
run: |
git config user.name github-actions
git config user.email [email protected]
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/cookbook_preproc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
branches:
- main

defaults:
run:
shell: bash -l {0}

concurrency:
group: ${{ github.workflow }}-${{ inputs.pr_number || github.ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -24,7 +28,6 @@ jobs:

steps:
- name: Choose deployment branch
shell: bash -l {0}
run: |
if [[ ${{ github.event_name }} != "workflow_dispatch" ]]; then
echo "DEPLOY_BRANCH=_cookbook_data_$GITHUB_REF_NAME" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -83,32 +86,25 @@ jobs:

return created_run.data.id

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: devtools/conda-envs/examples_env.yml
# default - will pull down 2.0 which we don't want!
# micromamba-version: latest
# pin to latest 1.x release
micromamba-version: "1.5.10-0"

- name: Pre-process and execute notebooks
shell: bash -l {0}
run: |
set -e
python source/_ext/proc_examples.py --prefix=deploy/ --cache-branch=${DEPLOY_BRANCH} --log-failures=notebooks_log.json

- name: Read notebooks log
if: always()
shell: bash -l {0}
run: |
cat 'notebooks_log.json'
echo "NOTEBOOKS_LOG=$(cat 'notebooks_log.json')" >> "$GITHUB_ENV"

- name: Deploy cache
shell: bash -l {0}
run: |
cd deploy

Expand All @@ -128,7 +124,6 @@ jobs:
- name: Trigger RTD build
# RTD doesn't offer a way to manually trigger builds in PRs, so we'll just do this for other builds
if: github.event_name == 'schedule' || github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.pr_number == '')
shell: bash -l {0}
run: |
curl -X POST -d "branches=$GITHUB_REF_NAME" -d "token=${{ secrets.RTD_WEBHOOK_TOKEN }}" https://readthedocs.org/api/v2/webhook/openff-docs/243876/

Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,26 @@ on:
- cron: "0 0 * * *"
workflow_dispatch:

defaults:
run:
shell: bash -l {0}

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: devtools/conda-envs/lint_env.yml

- name: Check dead links
shell: bash -l {0}
run: |
FORCE_COLOR=1 sphinx-build -n -W --keep-going -b linkcheck source build/linkcheck

- name: Check code blocks
shell: bash -l {0}
run: |
FORCE_COLOR=1 sphinx-build -n -W --keep-going -b codelinter source build/codelinter