Skip to content

Commit

Permalink
fix: identation
Browse files Browse the repository at this point in the history
  • Loading branch information
H3199 committed Aug 22, 2024
1 parent 6347680 commit 7c57d68
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,22 @@ on:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Runs a single command using the runners shell
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SERVER_URL }} >> ~/.ssh/known_hosts
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SERVER_URL }} >> ~/.ssh/known_hosts
- name: Deploy via SSH
run: |
ssh -i ~/.ssh/id_rsa ${{ secrets.SSH_USER }}@${{ secrets.SERVER_URL }} << 'EOF'
# Commands to execute on the server
#cd /path/to/your/app
#git pull origin main
#docker-compose down
#docker-compose up -d --build
echo $(date -Is) Hello World! >> hello.txt
EOF
- name: Deploy via SSH
run: |
ssh -i ~/.ssh/id_rsa ${{ secrets.SSH_USER }}@${{ secrets.SERVER_URL }} << 'EOF'
# Commands to execute on the server
echo $(date -Is) Hello World! >> hello.txt
EOF

0 comments on commit 7c57d68

Please sign in to comment.