Skip to content

print secrets for debugging #4

print secrets for debugging

print secrets for debugging #4

Workflow file for this run

name: Deploy to EC2
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE20: true
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Build the app
run: npm run build
steps:
- name: Print Secrets
run: |
echo "EC2 Host: ${{ secrets.EC2_HOST }}"
echo "EC2 User: ${{ secrets.EC2_USER }}"
echo "EC2 SSH Key: |"
echo "${{ secrets.EC2_SSH_KEY }}"
echo "This is just for debugging purposes. Make sure to remove it later."
env:

Check failure on line 37 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy.yml

Invalid workflow file

You have an error in your yaml syntax on line 37
EC2_SSH_KEY: ${{ secrets.EC2_SSH_KEY }}
- name: Copy files to EC2
uses: appleboy/[email protected]
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
port: 22
source: "build/*"
target: "/var/www/html/"
- name: Restart Nginx
run: |
ssh -i ${{ secrets.EC2_SSH_KEY }} -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} "sudo systemctl reload nginx"