Fix wiab automation #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |