Skip to content

Add a new GH Actions job to automatically update translated document pagse #598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 16, 2025

Conversation

seratch
Copy link
Member

@seratch seratch commented Apr 24, 2025

This pull request adds a new GitHub Actions job to automate the translation of document pages.

  • Before this job can run, OPENAI_API_KEY must be added to the project secrets.
  • It typically takes 8–10 minutes using the o3 model, so the job is configured to run only when there are changes under docs/ or in mkdocs.yml.
  • The job commits and pushes the translated changes, but it does not deploy the documents to GitHub Pages. If we think it’s better to deploy the latest changes automatically as well, I’m happy to update the workflow. (Personally, I don’t think it’s necessary, since the changes will be deployed with the next deployment job execution)

@seratch seratch added the documentation Improvements or additions to documentation label Apr 24, 2025
@seratch seratch requested a review from rm-openai April 24, 2025 23:37
@seratch seratch self-assigned this Apr 24, 2025
@seratch
Copy link
Member Author

seratch commented May 1, 2025

@rm-openai This PR is ready for review again. Once we set an appropriate API key in GH secrets, we can merge it.

Copy link
Contributor

This PR is stale because it has been open for 10 days with no activity.

@github-actions github-actions bot added the stale label May 12, 2025
@seratch seratch removed the stale label May 21, 2025
@seratch
Copy link
Member Author

seratch commented May 21, 2025

Thanks for the review! We can enable this automation when the secrets data is ready.

Copy link
Contributor

github-actions bot commented Jun 8, 2025

This PR is stale because it has been open for 10 days with no activity.

@github-actions github-actions bot added the stale label Jun 8, 2025
Copy link
Contributor

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Jun 15, 2025
@seratch seratch reopened this Jun 19, 2025
@seratch
Copy link
Member Author

seratch commented Jun 19, 2025

@rm-openai no rush at all, but let's internally discuss the best way to enable this CI job (mainly the token management)!

@seratch seratch removed the stale label Jun 19, 2025
Copy link
Contributor

github-actions bot commented Jul 1, 2025

This PR is stale because it has been open for 10 days with no activity.

@github-actions github-actions bot added the stale label Jul 1, 2025
@seratch seratch added skip-stale and removed stale labels Jul 11, 2025
@seratch
Copy link
Member Author

seratch commented Jul 12, 2025

The tests are failing due to current main branch's issue

@rm-openai
Copy link
Collaborator

@seratch feel free to merge whenever ready + ping me if we wanna get the openai key in as a secret

@seratch
Copy link
Member Author

seratch commented Jul 16, 2025

@rm-openai Thanks! I've been waiting for the appropriate API key for this task in secrets. When you have time, can you set the secret and then merge this?

@rm-openai
Copy link
Collaborator

@seratch I added a key called PROD_OPENAI_API_KEY. Specifically named it that so that random things looking for OPENAI_API_KEY (e.g. tests, openai sdk) don't read it.

@seratch
Copy link
Member Author

seratch commented Jul 16, 2025

Thanks, I've adjusted the job settings and the script to follow the naming.

@seratch seratch merged commit ae4ba3c into openai:main Jul 16, 2025
5 checks passed
@seratch seratch deleted the update-docs-job branch July 16, 2025 22:44
@seratch
Copy link
Member Author

seratch commented Jul 16, 2025

The initial execution failed because the main branch has a few protection rules, and keeping those rules are important. So, I will adjust this job to create a pull request instead, and prevent invoking again when the translated contents are merged into main branch.

[main 072165d] Update all translated document pages
 26 files changed, 1315 insertions(+), 524 deletions(-)
 create mode 100644 docs/ja/realtime/guide.md
 create mode 100644 docs/ja/realtime/quickstart.md
 create mode 100644 docs/ja/release.md
 create mode 100644 docs/ja/sessions.md
remote: error: GH006: Protected branch update failed for refs/heads/main.        
remote: 
remote: - Changes must be made through a pull request.        
remote: 
remote: - 5 of 5 required status checks are expected.        
To https://github.com/openai/openai-agents-python
 ! [remote rejected] main -> main (protected branch hook declined)
error: failed to push some refs to 'https://github.com/openai/openai-agents-python'

seratch added a commit that referenced this pull request Jul 17, 2025
…ranch (#1162)

This pull request resolves the execution error of #598 CI job. The job
pushes the changes directly to the main branch. However, our branch
policies do not allow bypassing required checks, so it always fails.
This pull request changes its behavior just to create a pull request and
then ask humans to review (actually you don't need to check translation
results though) and merge it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation skip-stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants