Skip to content

Commit

Permalink
ci: hide hardcoded paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilhermeasper committed Nov 23, 2023
1 parent 6f799d5 commit 8752adc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ jobs:
needs: build
runs-on: [self-hosted, Linux, X64]
steps:
- run: chmod +x ./deploy.sh
- run: echo ${{ secrets.DVNS_CLUSTER_PASSWORD }} | sudo -S ./deploy.sh
- name: Make deploy.sh executable
run: chmod +x ./deploy.sh
- name: Execute deploy.sh
run: echo "${{ secrets.DVNS_CLUSTER_PASSWORD }}" | sudo -S ./deploy.sh "$(pwd)/dist"
6 changes: 4 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

source /etc/marquinhos/marquinhos.conf

DESTINATION_DIR="$1"

service=$(cat << EOF
[Unit]
Expand All @@ -25,9 +27,9 @@ User=guilherme
KillMode=control-group
WorkingDirectory=/home/guilherme/github-runners/devaneios-runner/_work/MarquinhosBOT/MarquinhosBOT/dist
WorkingDirectory=$DESTINATION_DIR
ExecStart=/home/guilherme/.nvm/versions/node/v18.13.0/bin/node -r tsconfig-paths/register ./index.js
ExecStart=node -r tsconfig-paths/register ./index.js
Restart=always
Expand Down

0 comments on commit 8752adc

Please sign in to comment.