-
Notifications
You must be signed in to change notification settings - Fork 7
40 lines (33 loc) · 956 Bytes
/
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
name: Deploy blog on AlwaysData
on:
push:
branches:
- red
jobs:
jekyll:
runs-on: ubuntu-20.04
environment: production-alwaysdata
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
name: id_ed25519
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
config: |
Host alwaysdata
HostName ssh-sudweb.alwaysdata.net
User sudweb_blog
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
- name: Build the blog
run: |
bundle exec rake build:prod
bundle exec rake postbuild:test
- name: Deploy the blog on AlwaysData
run: rsync -r --delete-after --quiet --exclude '.ssh' ./_site/blog/ alwaysdata:/home/sudweb/www/blog/