Skip to content

Commit

Permalink
ci: add build-and-deploy job for GitHub Pages deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
raffaele-oplabs committed Dec 23, 2024
1 parent 928070c commit 4ec9c4a
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 4 deletions.
57 changes: 53 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,45 @@ commands:
echo "export GOOGLE_APPLICATION_CREDENTIALS='<< parameters.gcp_cred_config_file_path >>'" | tee -a "$BASH_ENV"
jobs:
build-and-deploy:
machine:
image: ubuntu-2004:current
steps:
- checkout
# Fetch more history for diffing
- run:
name: Fetch git history
command: |
git fetch --depth 1000
# Build forkdiff using Docker
- setup_remote_docker
- run:
name: Build forkdiff
command: |
docker run --volume $(pwd):/workspace \
protolambda/forkdiff:0.1.0 \
-repo=/workspace \
-fork=/workspace/fork.yaml \
-out=/workspace/index.html
# Prepare pages directory
- run:
name: Build pages
command: |
mkdir -p tmp/pages
mv index.html tmp/pages/index.html
touch tmp/pages/.nojekyll
if [ "$CIRCLE_PROJECT_REPONAME" == "op-geth" ] && [ "$CIRCLE_PROJECT_USERNAME" == "ethereum-optimism" ]; then
echo "op-geth.optimism.io" > tmp/pages/CNAME
fi
# Deploy to GitHub Pages
- run:
name: Deploy to GitHub Pages
command: |
echo "here we would deploy"
docker-release:
environment:
DOCKER_BUILDKIT: 1
Expand Down Expand Up @@ -107,7 +146,7 @@ jobs:
-f Dockerfile .
- when:
condition:
equal: [ true, <<parameters.push_tags>> ]
equal: [true, <<parameters.push_tags>>]
steps:
- run:
name: Tag
Expand Down Expand Up @@ -136,7 +175,6 @@ jobs:
--signer-logging-level="INFO"\
--attestor-key-id="//cloudkms.googleapis.com/v1/projects/$ATTESTOR_PROJECT_NAME/locations/global/keyRings/$ATTESTOR_NAME-key-ring/cryptoKeys/$ATTESTOR_NAME-key/cryptoKeyVersions/1"
build-geth:
docker:
- image: cimg/go:<<pipeline.parameters.go_version>>
Expand Down Expand Up @@ -182,7 +220,6 @@ jobs:
event: fail
template: basic_fail_1


workflows:
main:
jobs:
Expand Down Expand Up @@ -228,8 +265,20 @@ workflows:
cron: "0 0 * * *"
filters:
branches:
only: [ "optimism" ]
only: ["optimism"]
jobs:
- check-releases:
name: Check for new upstream releases
context: slack

merge:
jobs:
- build-and-deploy:
filters:
branches:
only: migrate-to-circleci

# - build-and-deploy:
# filters:
# branches:
# only: optimism
1 change: 1 addition & 0 deletions charts
Submodule charts added at c64712

0 comments on commit 4ec9c4a

Please sign in to comment.