Skip to content

Commit 28c6b83

Browse files
authored
Merge pull request #27 from codeigniter4/deploy-action
Add deploy workflow
2 parents dfcaf31 + 0c79434 commit 28c6b83

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/scripts/deploy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
# Deploys the User Guide to the production
4+
# website. Triggered by updates to the GitHub
5+
# repo's master branch.
6+
7+
cd "$REPO_DIRECTORY"
8+
git pull

.github/workflows/deploy.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Deploys the User Guide to the production
2+
# website whenever master branch is updated
3+
name: Deploy Production
4+
5+
on:
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: executing remote ssh commands using ssh key
16+
uses: appleboy/ssh-action@master
17+
with:
18+
host: ${{ secrets.HOST }}
19+
username: ${{ secrets.USERNAME }}
20+
key: ${{ secrets.KEY }}
21+
port: ${{ secrets.PORT }}
22+
script: ~/userguide/.github/scripts/deploy

0 commit comments

Comments
 (0)