-
Notifications
You must be signed in to change notification settings - Fork 16
56 lines (48 loc) · 1.38 KB
/
deployment.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
51
52
53
54
55
56
name: Deployment
on:
schedule:
# every day at 2:00
- cron: '0 2 * * *'
push:
branches:
- master
- actions_test
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Setup Environment.
run: |
gem install jekyll -v 4.2.2
gem install bundler
bundle install
- name: Update RIOT data
run: make update_riot_data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use GitHub Actions' cache to shorten build times and decrease load on servers
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: ${{ runner.os }}-gems-
- name: Build Site with Jekyll.
run: PRODUCTION=1 make build
- name: Deploy
uses: burnett01/[email protected]
with:
switches: -avzr --delete
path: _site/
remote_path: /
remote_host: ${{ secrets.SSH_REMOTE_HOST }}
remote_port: ${{ secrets.SSH_REMOTE_PORT }}
remote_user: ${{ secrets.SSH_REMOTE_USER }}
remote_key: ${{ secrets.SSH_PRIVATE_KEY }}