Skip to content

Commit

Permalink
Reduce the size of the gh-pages branch
Browse files Browse the repository at this point in the history
https://github.com/peaceiris/actions-gh-pages?tab=readme-ov-file#%EF%B8%8F-force-orphan-force_orphan

> We can set the force_orphan: true option. This allows you to make your
> publish branch with only the latest commit.

On its own, this won't remove the gh-pages history, but once the branch
is pointing at an orphaned commit we should be able to remove the
references to the old gh-pages commits and garbage collect them.
  • Loading branch information
richardTowers committed Jan 22, 2025
1 parent 2ec2033 commit 5d80fc7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
publish_dir: ./build
cname: docs.publishing.service.gov.uk
commit_message: ${{steps.commit_message_writer.outputs.commit_message}}
force_orphan: true
- name: Notify failure
uses: slackapi/slack-github-action@v1
if: ${{ failure() }}
Expand Down

0 comments on commit 5d80fc7

Please sign in to comment.