-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.21 KB
/
production.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
name: 🚀 Deploy on production
on:
push:
branches:
- production
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: 📂 setup
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
- name: 💎 setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: 🔨 build production
#uses: lemonarc/jekyll-action@1.0.0
run: |
bundle config path vendor/bundle
bundle install
bundle exec jekyll build
cp -f .htaccess _site/
- name: 🔐 Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: 🎯 Adding Known Hosts
run: ssh-keyscan -H agilebrazil.com >> ~/.ssh/known_hosts
- name: 🚀 deploy on production
run: rsync -zav --progress --delete -e 'ssh -o StrictHostKeyChecking=no' _site/ agilebrazil@agilebrazil.com:agilebrazil.com/2023