Skip to content

Commit 5c90aae

Browse files
committed
Add GitHub Actions workflow for automated production deployment
1 parent 32e713f commit 5c90aae

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy to Production
2+
3+
on:
4+
push:
5+
branches:
6+
- master # or main, depending on your default branch name
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Set up SSH
16+
uses: webfactory/[email protected]
17+
with:
18+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
19+
20+
- name: Add server to known hosts
21+
run: |
22+
mkdir -p ~/.ssh
23+
ssh-keyscan -H profullstack >> ~/.ssh/known_hosts
24+
25+
- name: Deploy to server
26+
run: |
27+
./bin/deploy.sh
28+
env:
29+
DEPLOY_REMOTE_HOST: profullstack
30+
DEPLOY_REMOTE_DIR: www/profullstack.com/pdf
31+
INSTALL_SERVICE: true

0 commit comments

Comments
 (0)