Skip to content

Commit b089129

Browse files
authored
Merge pull request #253 from css-naked-day/chore/deploy-to-own-server
chore: Deploy to self-hosted prod
2 parents 325757c + eaa3a4c commit b089129

File tree

3 files changed

+42
-6
lines changed

3 files changed

+42
-6
lines changed

.github/workflows/deploy-prod.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy Eleventy on prod via rsync
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-olatest
12+
steps:
13+
# Check-out the repository under $GITHUB_WORKSPACE.
14+
- uses: actions/checkout@master
15+
16+
- name: Install dependencies.
17+
run: npm ci
18+
19+
- name: Lint with fix.
20+
run: npx eslint --fix
21+
22+
# Build the website with Eleventy.
23+
- name: Build Eleventy.
24+
run: npm run build
25+
26+
# Rsync files via SSH.
27+
- name: Sync files with server.
28+
uses: burnett01/rsync-deployments@master
29+
with:
30+
switches: -rlD --delete --exclude='.htaccess'
31+
path: _site/
32+
remote_path: ${{ secrets.REMOTE_PATH_PROD }}
33+
remote_host: ${{ secrets.REMOTE_HOST_PROD }}
34+
remote_port: ${{ secrets.REMOTE_PORT_PROD }}
35+
remote_user: ${{ secrets.REMOTE_USER_PROD }}
36+
remote_key: ${{ secrets.REMOTE_PRIVATE_KEY_PROD }}
37+
remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS_PROD }}

.github/workflows/deploy-staging.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
switches: -rlD --delete --exclude='.htaccess'
3131
path: _site/
3232
remote_path: ${{ secrets.REMOTE_PATH_STAGING }}
33-
remote_host: ${{ secrets.REMOTE_HOST }}
34-
remote_port: ${{ secrets.REMOTE_PORT }}
35-
remote_user: ${{ secrets.REMOTE_USER }}
36-
remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }}
37-
remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS }}
33+
remote_host: ${{ secrets.REMOTE_HOST_STAGING }}
34+
remote_port: ${{ secrets.REMOTE_PORT_STAGING }}
35+
remote_user: ${{ secrets.REMOTE_USER_STAGING }}
36+
remote_key: ${{ secrets.REMOTE_PRIVATE_KEY_STAGING }}
37+
remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS_STAGING }}

CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)