Skip to content

Commit 81d97cc

Browse files
authored
docs: fix deploy variables (#25685)
* ci: docs try again Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: try to fix docs deploy syntax Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: test for main and release/1.16 Signed-off-by: Ramon Roche <mrpollo@gmail.com> --------- Signed-off-by: Ramon Roche <mrpollo@gmail.com>
1 parent 12601ac commit 81d97cc

1 file changed

Lines changed: 9 additions & 22 deletions

File tree

.github/workflows/docs_deploy_aws.yml

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,9 @@ on:
55
branches:
66
- "main"
77
- "release/**"
8-
paths:
9-
- "docs/en/**"
108
pull_request:
119
branches:
1210
- "**"
13-
paths:
14-
- "docs/en/**"
15-
- "docs/zh/**"
16-
- "docs/uk/**"
17-
- "docs/ko/**"
18-
19-
workflow_dispatch:
2011

2112
permissions:
2213
contents: read
@@ -28,15 +19,7 @@ concurrency:
2819

2920
jobs:
3021
build:
31-
runs-on:
32-
[
33-
runs-on,
34-
runner=8cpu-linux-x64,
35-
image=ubuntu24-full-x64,
36-
"run-id=${{ github.run_id }}",
37-
spot=false,
38-
extras=s3-cache,
39-
]
22+
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
4023
outputs:
4124
branchname: ${{ steps.set-branch.outputs.branchname }}
4225
releaseversion: ${{ steps.set-version.outputs.releaseversion }}
@@ -52,7 +35,11 @@ jobs:
5235
- id: set-version
5336
run: |
5437
branch="${{ steps.set-branch.outputs.branchname }}"
55-
version="v${branch#release/}"
38+
if [[ "$branch" == "main" ]]; then
39+
version="main"
40+
else
41+
version="v${branch#release/}"
42+
fi
5643
echo "::set-output name=releaseversion::$version"
5744
5845
- name: Setup Node
@@ -85,7 +72,7 @@ jobs:
8572
deploy:
8673
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) || github.event_name == 'workflow_dispatch' }}
8774
needs: build
88-
runs-on: ubuntu-latest
75+
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
8976

9077
steps:
9178
- name: Download Artifact
@@ -105,14 +92,14 @@ jobs:
10592

10693
- name: Upload HTML with short cache
10794
run: |
108-
aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build.outputs.versionname }}/ \
95+
aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build.outputs.releaseversion }}/ \
10996
--delete \
11097
--exclude "*" --include "*.html" \
11198
--cache-control "public, max-age=60"
11299
113100
- name: Upload assets with long cache
114101
run: |
115-
aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build.outputs.versionname }}/ \
102+
aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build.outputs.releaseversion }}/ \
116103
--delete \
117104
--exclude "*.html" \
118105
--cache-control "public, max-age=86400, immutable"

0 commit comments

Comments
 (0)