-
Notifications
You must be signed in to change notification settings - Fork 13
50 lines (46 loc) · 1.17 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Jekyll Build and Deploy
on:
push:
branches: ["main"]
permissions:
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Build site
run: bundle exec jekyll build
- uses: actions/cache@v4
id: build-cache
with:
path: ./*
key: ${{ github.sha }}
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [build]
environment:
name: production
url: https://ournetworks.ca
steps:
- uses: actions/cache@v4
id: build-cache
with:
path: ./*
key: ${{ github.sha }}
- name: Rsync Deployment
uses: Burnett01/[email protected]
with:
switches: -avzrO --delete --no-p
path: _site/
remote_path: /var/www/html
remote_host: ournetworks.ca
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}