Skip to content

Rob

Rob #612

Workflow file for this run

name: Website Deploy
on:
push:
branches:
- develop
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Install dependencies
run: |
sudo apt install hunspell libhunspell-dev hunspell-en-us
- name: Pull Coursebook
run: |
git submodule init
git submodule update --recursive
- name: Build site
run: |
bundle exec rake
bundle exec rake spell_check
- name: Deploy site
run: |
# Needed to add the --no-tty --batch --yes flags to get gpg to work in Github Actions
# Based on this: https://discuss.circleci.com/t/error-sending-to-agent-inappropriate-ioctl-for-device/17465/3
gpg --no-tty --batch --yes --passphrase ${{ secrets.GPG_PASSPHRASE }} --output /tmp/dual_deploy_key --decrypt dual_deploy_key.enc
eval "$(ssh-agent -s)"
chmod 600 /tmp/dual_deploy_key
# Email from: # https://github.saobby.my.eu.orgmunity/t/github-actions-bot-email-address/17204/6
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "Github Actions Bot"
bash _scripts/deploy.sh