File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy-branch
2
+
3
+ on :
4
+ pull_request :
5
+ jobs :
6
+ deploy-branch :
7
+ runs-on : self-hosted
8
+ container : tarantool/doc-builder:slim-4.2
9
+ env :
10
+ AWS_ACCESS_KEY_ID : ${{secrets.AWS_ACCESS_KEY_ID}}
11
+ AWS_SECRET_ACCESS_KEY : ${{secrets.AWS_SECRET_ACCESS_KEY}}
12
+ AWS_DEFAULT_REGION : ${{secrets.AWS_DEFAULT_REGION}}
13
+ S3_ENDPOINT_URL : ${{secrets.S3_ENDPOINT_URL}}
14
+ S3_UPLOAD_PATH : ${{secrets.S3_UPLOAD_PATH}}
15
+ INTERNALS_UPDATE_URL : ${{secrets.INTERNALS_DEVELOP_UPDATE_URL}}
16
+ S3_BUCKET : ${{secrets.S3_BUCKET}}
17
+ steps :
18
+ - uses : actions/checkout@v2
19
+
20
+ - name : Set branch name from source branch
21
+ run : echo "BRANCH_NAME=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV
22
+
23
+ - run : make json
24
+ - run : bash upload_output.sh
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+
4
+ BRANCH=$BRANCH_NAME
5
+ DOC_DEST=" $secrets .S3_UPLOAD_PATH/internals/${BRANCH_NAME} "
6
+ CHECK_KEY=" doc-builds/internals/${BRANCH_NAME} /json/_build_ru/json/toctree.fjson"
7
+
8
+ aws s3api head-object --bucket ${S3_BUCKET} --key ${CHECK_KEY} --endpoint-url=" $ENDPOINT_URL " || not_exist=true
9
+ if [ $not_exist ]; then
10
+ echo " toctree.json does not exist"
11
+ else
12
+ echo " found toctree.json, remove the branch from s3 location"
13
+ aws s3 rm " $DOC_DEST " /json --endpoint-url=" $ENDPOINT_URL " --recursive
14
+ fi
15
+
16
+ aws s3 cp build/json " $DOC_DEST " /json --endpoint-url=" $ENDPOINT_URL " --recursive --include " *" --exclude " *.jpg" --exclude " *.png" --exclude " *.svg"
You can’t perform that action at this time.
0 commit comments