Skip to content

Commit

Permalink
Merge pull request #322 from ethereum-optimism/jan/circleci--004
Browse files Browse the repository at this point in the history
chore: Migrate Github Pages publishing to CircleCI [4/N]
  • Loading branch information
janjakubnanista authored Jan 21, 2025
2 parents 83bcde8 + e4d818b commit e3b6b55
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ executors:

orbs:
go: circleci/go@2.2.3
utils: ethereum-optimism/circleci-utils@0.0.12
utils: ethereum-optimism/circleci-utils@0.0.13

commands:
# By default, CircleCI does not checkout any submodules
Expand Down 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 e3b6b55

Please sign in to comment.