Skip to content

fix: use amend commit on gh-pages to prevent unbounded repo growth#1408

Open
Devansh-567 wants to merge 1 commit into
p4lang:mainfrom
Devansh-567:fix/gh-pages-amend-commit
Open

fix: use amend commit on gh-pages to prevent unbounded repo growth#1408
Devansh-567 wants to merge 1 commit into
p4lang:mainfrom
Devansh-567:fix/gh-pages-amend-commit

Conversation

@Devansh-567

@Devansh-567 Devansh-567 commented May 15, 2026

Copy link
Copy Markdown
Contributor

Currently the deploy job adds a new commit to gh-pages on every specchange, causing the .git directory to grow unboundedly over time.
This adopts the same approach used in the p4runtime repository:
EndBug/add-and-commit@v9 with commit: '--amend' and force push, keeping gh-pages permanently at a single commit regardless of how many times the spec is regenerated.

Also simplifies the deploy job by removing the manual git rebase steps, which are no longer needed since the action handles branch management internally.

Suggested by @jafingerhut in #1403.

@Devansh-567
Devansh-567 force-pushed the fix/gh-pages-amend-commit branch from bd731fc to 470ea5f Compare May 15, 2026 08:23
Signed-off-by: GitHub Actions <p4lang@users.noreply.github.com>
Signed-off-by: Devansh Singh <devansh.jay.singh@gmail.com>
@Devansh-567
Devansh-567 force-pushed the fix/gh-pages-amend-commit branch from 470ea5f to 94d9230 Compare May 15, 2026 08:28
@jafingerhut

Copy link
Copy Markdown
Collaborator

Thanks for the submission. It would take me a fair amount of learning about Github Actions to review this carefully, which I may do if no one else is able to give this a proper review in the next week or two.

@Devansh-567

Devansh-567 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Hi @jafingerhut, just checking in on this PR. I know GitHub Actions changes can take some time to review, so no rush. Whenever you or someone else gets a chance to look at it, I'd be happy to address any feedback or make any needed changes. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants