Deployment #972
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '3.0.2' | |
bundler-cache: true | |
- name: Setup Environment. | |
run: | | |
gem update --system 3.3.22 | |
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/[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 }} |