Process jp branch #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The name of this GH action | |
| name: Process jp branch | |
| # Defines when this action should be run | |
| on: | |
| # Run on any Push | |
| push: | |
| branches: | |
| - jp | |
| # Allow manual triggering | |
| workflow_dispatch: | |
| jobs: | |
| # A task that processes OpenAPI files from the jp branch | |
| process-jp-branch: | |
| # We run this on the latest ubuntu | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| node-version: [24.x] | |
| steps: | |
| - name: Check out scripts from main branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: refs/heads/main | |
| sparse-checkout: | | |
| .github/scripts | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check out api schemas from jp branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: refs/heads/jp | |
| path: openapi | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install script dependencies | |
| working-directory: .github/scripts | |
| run: npm install | |
| - name: Run add-code-samples script | |
| working-directory: .github/scripts | |
| run: npm run add-code-samples -- "../../openapi" "openapi.*\\.json" | |
| - name: Run link replacement script | |
| working-directory: .github/scripts | |
| run: npm run replace-links -- "../../openapi" "openapi.*\\.json" "https://developer.box.com/" "https://developer.box.com/ja/" | |
| - name: Push openapi directory to jp-api-docs branch | |
| uses: s0/[email protected] | |
| env: | |
| REPO: self | |
| BRANCH: refs/heads/jp-api-docs | |
| FOLDER: openapi | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |