Skip to content

Commit

Permalink
Set up CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
melissawm committed Apr 19, 2024
1 parent 5618375 commit 854f52f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: 2.1

orbs:
python: circleci/[email protected]
jobs:
build-blog:
docker:
- image: cimg/python:3.10.13
steps:
- checkout:
path: blog
- run:
name: Setup virtual environment
command: |
python -m venv venv
. venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r blog/requirements.txt
- run:
name: Build blog
command: |
. venv/bin/activate
sphinx-build source build
- store_artifacts:
path: blog/build
- persist_to_workspace:
root: .
paths:
- blog/build
workflows:
build-blog:
jobs:
- build-blog
19 changes: 19 additions & 0 deletions .github/workflows/circleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CircleCI artifact redirector

on: [status]
jobs:
circleci_artifacts_redirector_job:
runs-on: ubuntu-latest
if: "github.event.context == 'ci/circleci: build-docs'"
permissions:
statuses: write
name: Run CircleCI artifacts redirector
steps:
- name: GitHub Action step
uses: larsoner/circleci-artifacts-redirector-action@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
api-token: ${{ secrets.CIRCLECI_TOKEN }}
artifact-path: 0/blog/build/index.html
circleci-jobs: build-blog
job-title: Blog preview
2 changes: 0 additions & 2 deletions .github/workflows/deploy_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down

0 comments on commit 854f52f

Please sign in to comment.