-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create GH action for wiab deployment
- Loading branch information
1 parent
0ea5c23
commit 544ab08
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Deploy on Hetnzer WIAB setup | ||
on: | ||
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.SSH_PRIVATE_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 --short 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 ${{ env.commit_sha }} --target-domain wiab-test-box.wire.link |