Skip to content

Commit

Permalink
Fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpetros committed Mar 3, 2024
1 parent ed02d4e commit dcea567
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
#workflow.yaml
name: Deploy CI

on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Create SSH key
- name: Run deploy
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ../private.key
sudo chmod 600 ../private.key
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
ssh -i $SSH_KEY_PATH github@wemakeinter.net
cd /var/www/wmi-home-page
shell: bash
env:
SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}}
SSH_KNOWN_HOSTS: ${{secrets.SSH_KNOWN_HOSTS}}
SSH_KEY_PATH: ${{ github.workspace }}/../private.key
- name: Run Deploy
run: |
ssh -i $SSH_KEY_PATH github@wemakeinter.net
cd /var/www/wmi-home-page
git pull

0 comments on commit dcea567

Please sign in to comment.