Skip to content

Commit 58b05fa

Browse files
committed
github release proces added
1 parent eecec89 commit 58b05fa

1 file changed

Lines changed: 28 additions & 15 deletions

File tree

.github/workflows/release.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,41 @@
1-
name: Deploy Data & Tools on Release
1+
name: Deploy Static Docs
2+
23
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
39
release:
410
types: [published]
11+
workflow_dispatch:
512

613
jobs:
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}/"

0 commit comments

Comments
 (0)