Skip to content

Commit

Permalink
chore: Migrate github pages publishing to CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista committed Jan 21, 2025
1 parent c3f3157 commit e4d818b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,31 @@ jobs:
name: Run GoReleaser
command: goreleaser release --clean

book-build:
executor: default
environment:
MISE_ENV: book
steps:
- checkout
- install-dependencies
- run:
name: Build book
command: just build-book
- persist_to_workspace:
root: ./docs
paths:
- book

book-publish:
executor: default
steps:
- checkout
- attach_workspace:
at: /tmp/docs
- utils/get-github-access-token
- utils/github-pages-deploy:
src-pages-dir: /tmp/docs/book

workflows:
main:
jobs:
Expand All @@ -118,6 +143,23 @@ workflows:
- go-tests:
context:
- oplabs-rpc-urls

# To tighten the security, we split the workflow that publishes GitHub Pages
# into two jobs and only expose the security context to the job that does the publishing
#
# The build job will run on every PR to avoid unpleasant surprises if the book build fails on main
- book-build
# The publish job will only run on the main branch
- book-publish:
filters:
branches:
only:
- main
requires:
- book-build
context:
- circleci-repo-supersim

release:
jobs:
- go-release:
Expand Down

0 comments on commit e4d818b

Please sign in to comment.