Skip to content

Deployment

Deployment #910

Workflow file for this run

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 -v 2.4.22
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/rsync-deployments@4.1
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 }}