Skip to content

Commit

Permalink
ci: complete circleci migration (#461)
Browse files Browse the repository at this point in the history
* ci: update CircleCI config to use development version of utils and change branch filter

* ci: simplify GitHub Pages deployment process using built-in action

* ci: remove deprecated GitHub Pages deployment step from CircleCI config

* ci: update CircleCI config to use stable version of utils

* ci: remove GitHub Pages workflow configuration

* ci: update CircleCI config to change GitHub Pages branch and workflow filters
  • Loading branch information
raffaele-oplabs authored Jan 9, 2025
1 parent ae1828f commit b8c040c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 74 deletions.
41 changes: 3 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
orbs:
gcp-cli: circleci/[email protected]
slack: circleci/[email protected]
utils: ethereum-optimism/[email protected].7
utils: ethereum-optimism/[email protected].8

parameters:
go_version:
Expand Down Expand Up @@ -88,43 +88,8 @@ jobs:
private-key-str: GITHUB_APP_KEY
app-id: GITHUB_APP_ID
repo: $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
# Deploy to GitHub Pages
- run:
name: Deploy to GitHub Pages
command: |
pages_branch="gh-pages-test"
SOURCE_COMMIT=$(git rev-parse HEAD)
SOURCE_REPO="${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
USERNAME=${CIRCLE_USERNAME}
# Extract the email from the user info
ID=$(curl https://api.github.com/users/$USERNAME | jq -r '.id')
USER_EMAIL="${ID}+${USERNAME}@users.noreply.github.com"
# Git operations with committer's identity
git config --global user.name "${USERNAME}"
git config --global user.email "${USER_EMAIL}"
# Remove all files from staging
git reset --hard
#checkout target branch
git fetch origin ${pages_branch}
git checkout ${pages_branch}
# Clean working directory
rm -rf *
# Copy new files
cp -a /tmp/pages/. .
# Commit and push
git add .
git commit -m "Deploying to gh-pages from @ ${SOURCE_REPO}@${SOURCE_COMMIT} 🚀"
git push "https://x-access-token:${GITHUB_APP_TOKEN}@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git" ${pages_branch}
- utils/github-pages-deploy:
src-pages-dir: /tmp/pages
docker-release:
environment:
DOCKER_BUILDKIT: 1
Expand Down
Empty file removed .github/workflows/go.yml
Empty file.
36 changes: 0 additions & 36 deletions .github/workflows/pages.yaml

This file was deleted.

0 comments on commit b8c040c

Please sign in to comment.