File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Deploy Data & Tools on Release
1+ name : Deploy Static Docs
2+
23on :
4+ push :
5+ branches :
6+ - main
7+ - develop
8+ pull_request :
39 release :
410 types : [published]
11+ workflow_dispatch :
512
613jobs :
7- deploy :
8- name : Deploy to Azure Blob Storage
14+ release :
15+ name : Release `/tools` via SCP
916 runs-on : ubuntu-22.04
1017
18+ env :
19+ SSH_PRIVATE_KEY : ${{ secrets.SSH_DEPLOY_KEY }}
20+ SSH_HOST : ${{ secrets.SSH_HOST }}
21+ SSH_USER : ${{ secrets.SSH_USER }}
22+ SSH_TARGET_DIR : ${{ secrets.SSH_TARGET_DIR }}
23+
1124 steps :
12- - name : Checkout repository
25+ - name : Checkout repo
1326 uses : actions/checkout@v4
1427
15- - name : Download release artifacts
16- uses : actions/download-artifact@v3
17- with :
18- path : ./release-files
19-
20- - name : Install AzCopy
28+ - name : Setup SSH key
2129 run : |
22- curl -sL https://aka.ms/downloadazcopy-v10-linux | tar -xvz
23- sudo mv azcopy_linux_amd64_*/azcopy /usr/local/bin/azcopy
24- azcopy --version
30+ mkdir -p ~/.ssh
31+ echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
32+ chmod 600 ~/.ssh/id_rsa
33+ ssh-keyscan -H "$SSH_HOST" >> ~/.ssh/known_hosts
2534
26- - name : Upload files to Azure Blob Storage
35+ - name : Copy `.` via rsync
2736 run : |
28- azcopy sync "./release-files" "https://${{ secrets.AZURE_STORAGE_ACCOUNT }}.blob.core.windows.net/${{ secrets.AZURE_STORAGE_CONTAINER }}" --saskey="${{ secrets.AZURE_SAS_TOKEN }}" --recursive
37+ rsync -avzP \
38+ --ignore-existing \
39+ -e "ssh -i ~/.ssh/id_rsa" \
40+ . \
41+ "${SSH_USER}@${SSH_HOST}:${SSH_TARGET_DIR}/"
You can’t perform that action at this time.
0 commit comments