Skip to content

Commit

Permalink
Add deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
LordLuceus committed May 6, 2023
1 parent ae6b853 commit f260aa1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy to Server

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Deploy to Server
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
SERVER_IP: ${{ secrets.SERVER_IP }}
run: |
echo "$DEPLOY_KEY" > deploy_key
chmod 600 deploy_key
ssh -i deploy_key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$SERVER_IP "/home/luceus/melvin/deploy.sh"
rm -f deploy_key
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "file:///home/luceus/projects/personal/melvin/.github/workflows/deploy.yml"
}
}

0 comments on commit f260aa1

Please sign in to comment.