-
Notifications
You must be signed in to change notification settings - Fork 44
40 lines (35 loc) · 1.09 KB
/
deploy-wiab.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Deploy on Hetzner WIAB setup
on:
pull_request:
branches:
- master
workflow_run:
workflows: ["Prepare custom offline package"]
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: autodeploy-script
cancel-in-progress: false
steps:
# Step 1: Checkout the repository code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Set up SSH key for remote access
- name: Set up SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.WIAB_PRIVATE_SSH_KEY }}
# Step 3: Get the latest commit SHA, for the artifact
- name: Get latest commit SHA
id: get_commit_sha
run: |
COMMIT_SHA=$(git rev-parse HEAD)
echo "commit_sha=$COMMIT_SHA" >> $GITHUB_ENV
# Step 4: Run the autodeploy script
- name: Run Auto Deploy Script
run: |
cd bin
./autodeploy.sh --artifact-hash 2e8e4319ff3a8c309dc0ef5a1800611faa1ab0cb --target-domain wiab-test-box.wire.link --force-redeploy