Skip to content

fix: ensure docs sync works with protected branch#2142

Merged
beastoin merged 1 commit intoBasedHardware:mainfrom
krushnarout:fix-docs-workflow
Apr 2, 2025
Merged

fix: ensure docs sync works with protected branch#2142
beastoin merged 1 commit intoBasedHardware:mainfrom
krushnarout:fix-docs-workflow

Conversation

@krushnarout
Copy link
Copy Markdown
Member

@krushnarout krushnarout commented Apr 1, 2025

Because main is a protected branch, direct pushes from GitHub Actions are blocked. The only way to fix this is by having the action create a pull request when changes are made to sync the documentation.

To enable this, you need to check the "Allow GitHub Actions to create and approve pull requests" option.
Go to Repo Settings → Actions → General, then tick the checkbox for "Allow GitHub Actions to create and approve pull requests."

Screenshot 2025-04-01 at 6 28 55 PM

I've tested it in my own repo, and it works as expected: https://github.com/krushnarout/omi-docs-test/pull/1

@beastoin beastoin merged commit 5154ff9 into BasedHardware:main Apr 2, 2025
@beastoin
Copy link
Copy Markdown
Collaborator

beastoin commented Apr 2, 2025

Screenshot 2025-04-02 at 14 21 24 Screenshot 2025-04-02 at 14 21 54

ahhh @krushnarout please check

@krushnarout
Copy link
Copy Markdown
Member Author

Screenshot 2025-04-02 at 1 11 06 PM

@beastoin GitHub Actions is restricted at the organization level.

@kodjima33 Organization Settings → Actions → General, then tick the checkbox for "Allow GitHub Actions to create and approve pull requests."

@krushnarout krushnarout deleted the fix-docs-workflow branch April 2, 2025 07:47
@beastoin
Copy link
Copy Markdown
Collaborator

beastoin commented Apr 2, 2025

man, ofc i have to enable it at the org level first / this is the required step to enable it at the project level.

Screenshot 2025-04-02 at 16 54 52

@krushnarout

@krushnarout
Copy link
Copy Markdown
Member Author

man, ofc i have to enable it at the org level first / this is the required step to enable it at the project level.

Can you also enable read and write access, run the workflow, and let me know!

@beastoin

@beastoin
Copy link
Copy Markdown
Collaborator

beastoin commented Apr 2, 2025

Screenshot 2025-04-02 at 17 06 59 Screenshot 2025-04-02 at 17 06 51

sry man, still haha

@krushnarout
Copy link
Copy Markdown
Member Author

Fixed #2144

@beastoin pls merge this, everything will work!

beastoin added a commit that referenced this pull request Apr 3, 2025
Related to #2142

Only enable 'Allow GitHub Actions to create and approve pull requests.'
No need to grant 'Read and write permissions.'
Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
Because `main` is a protected branch, direct pushes from GitHub Actions
are blocked. The only way to fix this is by having the action create a
pull request when changes are made to sync the documentation.

To enable this, you need to check the "Allow GitHub Actions to create
and approve pull requests" option.
Go to Repo Settings → Actions → General, then tick the checkbox for
"Allow GitHub Actions to create and approve pull requests."

<img width="913" alt="Screenshot 2025-04-01 at 6 28 55 PM"
src="https://github.com/user-attachments/assets/e36e8947-8822-42a1-a702-95635cf1446a"
/>

I've tested it in my own repo, and it works as expected:
https://github.com/krushnarout/omi-docs-test/pull/1
Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
Related to BasedHardware#2142

Only enable 'Allow GitHub Actions to create and approve pull requests.'
No need to grant 'Read and write permissions.'
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