diff --git a/.github/workflows/en-api-docs.yml b/.github/workflows/en-api-docs.yml index 1df91e41..3757a806 100644 --- a/.github/workflows/en-api-docs.yml +++ b/.github/workflows/en-api-docs.yml @@ -1,5 +1,5 @@ # The name of this GH action -name: Process EN Branch +name: Process en branch # Defines when this action should be run on: @@ -15,28 +15,26 @@ jobs: process-en-branch: # We run this on the latest ubuntu runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 10 strategy: matrix: node-version: [24.x] steps: - - name: Check out the en branch + - name: Check out scripts from main branch uses: actions/checkout@v4 with: - ref: en + ref: refs/heads/main + sparse-checkout: | + .github/scripts token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - name: Check out scripts from main branch + - name: Check out api schemas from en branch uses: actions/checkout@v4 with: - ref: main - sparse-checkout: | - .github/scripts - sparse-checkout-cone-mode: false - path: .main-scripts + ref: refs/heads/en + path: openapi token: ${{ secrets.GITHUB_TOKEN }} - name: Set up Node.js @@ -45,21 +43,17 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install script dependencies - working-directory: .main-scripts/.github/scripts + working-directory: .github/scripts run: npm install - name: Run add-code-samples script - working-directory: .main-scripts/.github/scripts - run: npm run add-code-samples -- "../../.." "openapi.*\\.json" - - - name: Cleanup working directory - run: rm -rf .main-scripts + working-directory: .github/scripts + run: npm run add-code-samples -- "../../openapi" "openapi.*\\.json" - - name: Push processed files to en-api-docs branch + - name: Push openapi directory to en-api-docs branch uses: s0/git-publish-subdir-action@v2.6.0 env: REPO: self - BRANCH: en-api-docs - FOLDER: . + BRANCH: refs/heads/en-api-docs + FOLDER: openapi GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MESSAGE: "Add SDK code samples to OpenAPI files" diff --git a/.github/workflows/jp-api-docs.yml b/.github/workflows/jp-api-docs.yml index ffef362c..702b971d 100644 --- a/.github/workflows/jp-api-docs.yml +++ b/.github/workflows/jp-api-docs.yml @@ -1,5 +1,5 @@ # The name of this GH action -name: Process JP Branch +name: Process jp branch # Defines when this action should be run on: @@ -15,28 +15,26 @@ jobs: process-jp-branch: # We run this on the latest ubuntu runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 10 strategy: matrix: node-version: [24.x] steps: - - name: Check out the jp branch + - name: Check out scripts from main branch uses: actions/checkout@v4 with: - ref: jp + ref: refs/heads/main + sparse-checkout: | + .github/scripts token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - name: Check out scripts from main branch + - name: Check out api schemas from jp branch uses: actions/checkout@v4 with: - ref: main - sparse-checkout: | - .github/scripts - sparse-checkout-cone-mode: false - path: .main-scripts + ref: refs/heads/jp + path: openapi token: ${{ secrets.GITHUB_TOKEN }} - name: Set up Node.js @@ -45,26 +43,21 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install script dependencies - working-directory: .main-scripts/.github/scripts + working-directory: .github/scripts run: npm install - name: Run add-code-samples script - working-directory: .main-scripts/.github/scripts - run: npm run add-code-samples -- "../../.." "openapi.*\\.json" + working-directory: .github/scripts + run: npm run add-code-samples -- "../../openapi" "openapi.*\\.json" - name: Run link replacement script - working-directory: .main-scripts/.github/scripts - run: npm run replace-links -- "../../.." "openapi.*\\.json" "https://developer.box.com/" "https://developer.box.com/ja/" + working-directory: .github/scripts + run: npm run replace-links -- "../../openapi" "openapi.*\\.json" "https://developer.box.com/" "https://developer.box.com/ja/" - - name: Cleanup working directory - run: rm -rf .main-scripts - - - name: Push processed files to jp-api-docs branch + - name: Push openapi directory to jp-api-docs branch uses: s0/git-publish-subdir-action@v2.6.0 env: REPO: self - BRANCH: jp-api-docs - FOLDER: . + BRANCH: refs/heads/jp-api-docs + FOLDER: openapi GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MESSAGE: "Add SDK code samples and replace links for Japanese locale" - diff --git a/.github/workflows/notify.yml b/.github/workflows/notify.yml index fe544c16..3a1b31f7 100644 --- a/.github/workflows/notify.yml +++ b/.github/workflows/notify.yml @@ -20,12 +20,6 @@ jobs: node-version: [24.x] steps: - - name: "Trigger Netlify deployment" - uses: joelwmale/webhook-action@2.0.2 - env: - WEBHOOK_URL: ${{ secrets.NETLIFY_BOXDEV_JP_WEBHOOK }} - data: "{}" - - name: Notify other repositories of update uses: peter-evans/repository-dispatch@v1 with: