Skip to content

Commit

Permalink
ci: simplify 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 a27541b commit cffe566
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,20 @@ jobs:
command: |
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
# Create new orphan branch without parent history
git checkout --orphan ${pages_branch}
git reset --hard # Remove all files from staging
# Clean existing files (equivalent to clean: true)
git rm -rf .
# Clean working directory
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:
Expand Down

0 comments on commit cffe566

Please sign in to comment.