From c828716d6e8ad2c91fa829939d36920ee5e7ea12 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Tue, 6 Oct 2026 20:01:12 -0500 Subject: [PATCH] chore: drop docs job from release workflow --- .github/workflows/release.yml | 112 +--------------------------------- 1 file changed, 2 insertions(+), 110 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58bdca430..944ed3793 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -416,111 +416,9 @@ jobs: git commit -m "chore: bump Homebrew cask to $VERSION" git push origin HEAD:main - docs: - needs: [prep, merge-to-main] - if: ${{ always() && needs.merge-to-main.result == 'success' && inputs.mode != 'Overwrite release' }} - runs-on: blacksmith-2vcpu-ubuntu-2404 - steps: - - name: Checkout Termix - uses: actions/checkout@v7 - with: - ref: ${{ needs.merge-to-main.outputs.build_ref }} - fetch-depth: 1 - path: termix - - - name: Setup Node.js - uses: actions/setup-node@v7 - with: - node-version-file: "termix/.nvmrc" - cache: "npm" - cache-dependency-path: termix/package-lock.json - - - name: Generate OpenAPI spec - working-directory: termix - run: | - npm ci - npm run generate:openapi - - - name: Checkout Docs repository - uses: actions/checkout@v7 - with: - repository: Termix-SSH/Docs - ref: main - fetch-depth: 0 - token: ${{ secrets.TERMIX_PAT }} - path: docs-repo - - - name: Create docs release branch - working-directory: docs-repo - run: | - BRANCH="dev-${{ needs.prep.outputs.version }}" - if git ls-remote --exit-code origin "refs/heads/$BRANCH" >/dev/null 2>&1; then - echo "Reusing existing docs branch $BRANCH." - git checkout -B "$BRANCH" "origin/$BRANCH" - else - git checkout -B "$BRANCH" - fi - - - name: Overwrite OpenAPI spec and regenerate API docs - working-directory: docs-repo - run: | - cp ../termix/openapi.json static/openapi.json - npm ci - npm run docusaurus clean-api-docs termix - npm run docusaurus gen-api-docs termix - - - name: Commit and push docs branch - working-directory: docs-repo - run: | - git config user.name "LukeGus" - git config user.email "bugattiguy527@gmail.com" - - if git diff --quiet; then - echo "No docs changes to commit." - exit 0 - fi - - if [ "${{ inputs.mode }}" = "Dry run" ]; then - echo "DRY RUN: would commit and push the following docs changes to dev-${{ needs.prep.outputs.version }}:" - git --no-pager diff --stat - exit 0 - fi - - git add -A - git commit -m "feat: update API docs for ${{ needs.prep.outputs.version }}" - git push origin "dev-${{ needs.prep.outputs.version }}" - - - name: Open and squash-merge docs PR - if: ${{ inputs.mode != 'Dry run' }} - working-directory: docs-repo - env: - GH_TOKEN: ${{ secrets.TERMIX_PAT }} - run: | - BRANCH="dev-${{ needs.prep.outputs.version }}" - if ! git ls-remote --exit-code origin "refs/heads/$BRANCH" >/dev/null 2>&1; then - echo "No docs branch pushed (nothing changed); skipping PR." - exit 0 - fi - - PR_NUMBER=$(gh pr list --repo Termix-SSH/Docs --head "$BRANCH" --base main --state open --json number -q '.[0].number' || true) - if [ -z "$PR_NUMBER" ]; then - PR_URL=$(gh pr create --repo Termix-SSH/Docs \ - --base main --head "$BRANCH" \ - --title "v${{ needs.prep.outputs.version }}" \ - --body "API docs for ${{ needs.prep.outputs.version }}") - PR_NUMBER=$(echo "$PR_URL" | grep -oE '[0-9]+$') - fi - - if [ -z "$PR_NUMBER" ]; then - echo "Failed to find or create a PR for $BRANCH." - exit 1 - fi - - gh pr merge "$PR_NUMBER" --repo Termix-SSH/Docs --squash --admin - cleanup: - needs: [prep, merge-to-main, electron-release, cask-commit-back, docs] - if: ${{ always() && (inputs.mode == 'Everything' || inputs.mode == 'Skip submit') && needs.merge-to-main.result == 'success' && needs.docs.result == 'success' }} + needs: [prep, merge-to-main, electron-release, cask-commit-back] + if: ${{ always() && (inputs.mode == 'Everything' || inputs.mode == 'Skip submit') && needs.merge-to-main.result == 'success' }} runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: Checkout repository @@ -536,9 +434,3 @@ jobs: git push https://x-access-token:${{ secrets.TERMIX_PAT }}@github.com/${{ github.repository }}.git \ --delete "${{ needs.prep.outputs.dev_branch }}" || true - - name: Delete dev branch in Docs - env: - GH_TOKEN: ${{ secrets.TERMIX_PAT }} - run: | - git push https://x-access-token:${{ secrets.TERMIX_PAT }}@github.com/Termix-SSH/Docs.git \ - --delete "dev-${{ needs.prep.outputs.version }}" || true