Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circleci updates #1122

Merged
merged 2 commits into from
Sep 6, 2024
Merged
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
34 changes: 18 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,60 +20,62 @@ jobs:
# Documentation CI
docs-build:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.12
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
- v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-python3.10-
- v2-dependencies-python3.12-
- run:
name: Install dependencies
# Note that we the circleci node image installs stuff with a user "circleci", rather
# than root. So we need to tell npm where to install stuff.
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r ./docs/requirements.txt
pip install uv
uv venv
source .venv/bin/activate
uv pip install -r ./docs/requirements.txt
- save_cache:
paths:
- ./venv
key: v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
key: v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }}
- run:
name: Build docs
command: |
. venv/bin/activate
source .venv/bin/activate
cd docs/
make deploy_docs
cd ..

docs-build-deploy:
docker:
- image: cimg/python:3.10-node
- image: cimg/python:3.12-node
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
- v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-python3.10-
- v2-dependencies-python3.12-
- run:
name: Install dependencies
# Note that we the circleci node image installs stuff with a user "circleci", rather
# than root. So we need to tell npm where to install stuff.
command: |
npm set prefix=/home/circleci/npm
npm install -g --silent [email protected]
python3 -m venv venv
. venv/bin/activate
pip install -r ./docs/requirements.txt
pip install uv
uv venv
source .venv/bin/activate
uv pip install -r ./docs/requirements.txt
- save_cache:
paths:
- ./venv
key: v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }}
key: v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }}
- add_ssh_keys:
# This SSH key is "CircleCI Docs" in https://github.com/move-coop/parsons/settings/keys
# We need write access to the Parsons repo, so we can push the "gh-pages" branch.
Expand All @@ -85,7 +87,7 @@ jobs:
# (This file tell Github Pages that we want to include all files in docs/, including those
# that start with an underscore like _static/).
command: |
. venv/bin/activate
source .venv/bin/activate
cd docs/
make deploy_docs
cd ..
Expand Down