DYN-9484 Update html doc update workflow#16533
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9484
There was a problem hiding this comment.
Pull Request Overview
This PR improves the GitHub workflow for automatically updating HTML documentation by refining naming conventions, reorganizing step configurations, and enhancing code clarity. The workflow continues to detect changes in doc/distrib/html/ files and automatically creates PRs to update corresponding files in the src/ directory.
Key Changes
- Renamed workflow, job, and step IDs to use more descriptive and consistent naming
- Reorganized environment variable declarations and shell specifications for better readability
- Updated commit messages and branch naming to be more specific to documentation updates
| # Push changes to the new branch | ||
| git push https://x-access-token:${{ secrets.DYNAMO_ACTIONS_TOKEN }}@github.com/${{ github.repository }} HEAD:$BRANCH |
There was a problem hiding this comment.
Using tokens directly in git URLs can expose them in logs. Consider using git config to set up authentication or use the git push with origin instead of the full URL.
| # Push changes to the new branch | |
| git push https://x-access-token:${{ secrets.DYNAMO_ACTIONS_TOKEN }}@github.com/${{ github.repository }} HEAD:$BRANCH | |
| # Set up git authentication using credential helper | |
| git config --local credential.helper '!f() { echo "username=x-access-token"; echo "password=${{ secrets.DYNAMO_ACTIONS_TOKEN }}"; }; f' | |
| # Push changes to the new branch using origin | |
| git push origin HEAD:$BRANCH |
| env: | ||
| CHANGED_FILES: ${{ steps.detect_changes.outputs.changed_files }} | ||
| shell: python | ||
| run: | |
There was a problem hiding this comment.
The environment variable CHANGED_FILES is defined here but was previously defined after the run block. While this organization is cleaner, ensure the Python script properly handles the case when CHANGED_FILES is empty or undefined to avoid runtime errors.
Purpose
Update html doc update workflow
Declarations
Check these if you believe they are true
Release Notes
N/A
Reviewers
@RobertGlobant20 @QilongTang
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of