Skip to content

Commit

Permalink
ci: enhance GitHub Pages deployment process in CircleCI config
Browse files Browse the repository at this point in the history
  • Loading branch information
raffaele-oplabs committed Dec 23, 2024
1 parent d3c36c0 commit a27541b
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: 2.1
orbs:
gcp-cli: circleci/[email protected]
slack: circleci/[email protected]
utils: ethereum-optimism/[email protected]

parameters:
go_version:
Expand Down Expand Up @@ -88,7 +89,27 @@ jobs:
- run:
name: Deploy to GitHub Pages
command: |
echo "here we would deploy"
pages_branch="gh-pages-test"
# Create or switch to gh-pages branch
if git ls-remote --heads origin ${pages_branch}; then
git fetch origin ${pages_branch}
git checkout ${pages_branch}
else
git checkout --orphan ${pages_branch}
git rm -rf .
fi
# Clean existing files (equivalent to clean: true)
git rm -rf .
# Copy new files
cp -a tmp/pages/. .
# Commit and push
git add .
git commit -m "Deploy to GitHub Pages [skip ci]"
# git push origin ${pages_branch} --force
docker-release:
environment:
Expand Down

0 comments on commit a27541b

Please sign in to comment.