From 81d97cc81d53485fdbd75fb7a1018b5b4957a917 Mon Sep 17 00:00:00 2001 From: Ramon Roche Date: Tue, 30 Sep 2025 19:30:51 -0700 Subject: [PATCH] docs: fix deploy variables (#25685) * ci: docs try again Signed-off-by: Ramon Roche * ci: try to fix docs deploy syntax Signed-off-by: Ramon Roche * ci: test for main and release/1.16 Signed-off-by: Ramon Roche --------- Signed-off-by: Ramon Roche --- .github/workflows/docs_deploy_aws.yml | 31 ++++++++------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/.github/workflows/docs_deploy_aws.yml b/.github/workflows/docs_deploy_aws.yml index b8478cdfc0..04c182c0f9 100644 --- a/.github/workflows/docs_deploy_aws.yml +++ b/.github/workflows/docs_deploy_aws.yml @@ -5,18 +5,9 @@ on: branches: - "main" - "release/**" - paths: - - "docs/en/**" pull_request: branches: - "**" - paths: - - "docs/en/**" - - "docs/zh/**" - - "docs/uk/**" - - "docs/ko/**" - - workflow_dispatch: permissions: contents: read @@ -28,15 +19,7 @@ concurrency: jobs: build: - runs-on: - [ - runs-on, - runner=8cpu-linux-x64, - image=ubuntu24-full-x64, - "run-id=${{ github.run_id }}", - spot=false, - extras=s3-cache, - ] + runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache] outputs: branchname: ${{ steps.set-branch.outputs.branchname }} releaseversion: ${{ steps.set-version.outputs.releaseversion }} @@ -52,7 +35,11 @@ jobs: - id: set-version run: | branch="${{ steps.set-branch.outputs.branchname }}" - version="v${branch#release/}" + if [[ "$branch" == "main" ]]; then + version="main" + else + version="v${branch#release/}" + fi echo "::set-output name=releaseversion::$version" - name: Setup Node @@ -85,7 +72,7 @@ jobs: deploy: if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) || github.event_name == 'workflow_dispatch' }} needs: build - runs-on: ubuntu-latest + runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache] steps: - name: Download Artifact @@ -105,14 +92,14 @@ jobs: - name: Upload HTML with short cache run: | - aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build.outputs.versionname }}/ \ + aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build.outputs.releaseversion }}/ \ --delete \ --exclude "*" --include "*.html" \ --cache-control "public, max-age=60" - name: Upload assets with long cache run: | - aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build.outputs.versionname }}/ \ + aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build.outputs.releaseversion }}/ \ --delete \ --exclude "*.html" \ --cache-control "public, max-age=86400, immutable"