Skip to content

Commit

Permalink
(cicd) Deploy Target
Browse files Browse the repository at this point in the history
  • Loading branch information
lilchizh committed Mar 11, 2024
1 parent 8987c23 commit 1b7f9c6
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/deployDev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
name: Algebra Integral Dev Deploy

on:
push:
branches:
- dev
workflow_dispatch:
inputs:
target:
description: 'Environment'
required: true
default: 'dev'
type: choice
options:
- dev

jobs:
deploy:
name: Build
Expand All @@ -12,6 +19,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Set dev target path
if: ${{ inputs.target == 'dev' }}
run: |
echo "TARGET_PATH=${{ secrets.DEV_DEPLOYMENT_PATH }}" >> $GITHUB_ENV
- name: Set up node
uses: actions/setup-node@v3
with:
Expand All @@ -30,4 +42,4 @@ jobs:
- run: echo "${{ secrets.SHHKEYM }}" > "$HOME/.ssh/SHHKEYM"
- run: chmod 600 "$HOME/.ssh/SHHKEYM"
#deploy
- run: cd dist && rsync -e "ssh -i $HOME/.ssh/SHHKEYM -o StrictHostKeyChecking=no" -a --compress --delete . ${{ secrets.DEV_DEPLOYMENT_PATH }}
- run: cd dist && rsync -e "ssh -i $HOME/.ssh/SHHKEYM -o StrictHostKeyChecking=no" -a --compress --delete . ${{ env.TARGET_PATH }}

0 comments on commit 1b7f9c6

Please sign in to comment.