Update node.js.yml #630
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: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Decrypt credentials | |
run: | | |
# Path variables | |
CREDENTIALS_ENC="/home/mnagaraju/actions-runner/Testproject-inno/credentials.enc" | |
ENCRYPTION_KEY="/home/mnagaraju/actions-runner/Testproject-inno/encryption_key.txt" | |
CREDENTIALS="/home/mnagaraju/actions-runner/Testproject-inno/credentials.txt" | |
# Decrypt the credentials | |
openssl enc -aes-256-cbc -pbkdf2 -d -in $CREDENTIALS_ENC -out $CREDENTIALS -pass file:$ENCRYPTION_KEY | |
if [ $? -ne 0 ]; then | |
echo "Decryption failed" | |
exit 1 | |
fi | |
echo "Decryption succeeded" | |
- name: Deploy with Docker Compose | |
run: | | |
docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno/docker-compose-test.yml up --build -d | |