Skip to content

Commit

Permalink
deliver compiled project to the remote server
Browse files Browse the repository at this point in the history
  • Loading branch information
rantanevich committed Mar 15, 2024
1 parent c29e490 commit 18fe762
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
22 changes: 16 additions & 6 deletions .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,27 @@ runs:
- name: Install NPM dependencies
working-directory: ui
shell: sh
run: |
pnpm install
pnpm run build
run: pnpm install

- name: Build project
working-directory: ui
shell: sh
run: pnpm run build

- name: Deploy compiled project to the remote server
shell: sh
run: |
ls -lha
pnpm run build
ls -lha
sshpass -p "${{ inputs.ssh_password }}" \
rsync \
--archive \
--verbose \
--human-readable \
--delete-before \
${{ inputs.keep_source_maps == 'false' && '--exclude="*.map"' || '' }} ui/ ${{ inputs.ssh_username }}@${{ inputs.ssh_hostname }}:${{ inputs.webroot }}/
sshpass -p "${{ inputs.ssh_password }}" \
ssh ${{ inputs.ssh_username }}@${{ inputs.ssh_hostname }} "sudo systemctl restart ${{ inputs.serv }}"
# - name: Copy Files to Server
# shell: sh
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ jobs:
export_to: output,log
mode: fill

- name: print IP address
run: |
echo "secrets.FRONT_SCORE_IP=${{ secrets.FRONT_SCORE_IP }}"
echo "steps.settings.outputs.ssh_hostname=${{ steps.settings.outputs.ssh_hostname }}"
- name: Deploy React.js
uses: ./.github/actions/deploy
with:
Expand Down

0 comments on commit 18fe762

Please sign in to comment.