Skip to content

Commit c2c51a3

Browse files
committed
Add Github Actions to deploy to staging.
1 parent fc46877 commit c2c51a3

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy Eleventy on staging via rsync
2+
3+
on:
4+
push:
5+
branches: [staging]
6+
pull_request:
7+
branches: [staging]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# Check-out the repository under $GITHUB_WORKSPACE.
14+
- uses: actions/checkout@master
15+
16+
# Build the website with Eleventy.
17+
- name: Building Eleventy…
18+
run: npm i && npm run build
19+
20+
# Rsync files via SSH.
21+
- name: Syncing files with server…
22+
uses: burnett01/rsync-deployments@master
23+
with:
24+
switches: -rlD --delete --exclude='.htaccess'
25+
path: _site/
26+
remote_path: ${{ secrets.REMOTE_PATH_STAGING }}
27+
remote_host: ${{ secrets.REMOTE_HOST }}
28+
remote_port: ${{ secrets.REMOTE_PORT }}
29+
remote_user: ${{ secrets.REMOTE_USER }}
30+
remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }}
31+
remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS }}

0 commit comments

Comments
 (0)