-
Notifications
You must be signed in to change notification settings - Fork 780
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: enhance GitHub Pages deployment process in CircleCI config
- Loading branch information
1 parent
d3c36c0
commit a27541b
Showing
1 changed file
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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: | ||
|