Skip to content

Debug release

Debug release #35

Workflow file for this run

name: Build And Test
on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Set up Ruby
uses: ruby/setup-ruby@v1.152.0
with:
ruby-version: '3.2'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
bundle install
- name: Code Style
run: |
./run_checks.sh
- name: Build
run: |
bundle exec jekyll build
release:
runs-on: ubuntu-latest
concurrency: release
environment: Production
if: github.repository == 'andrewjw/site' && github.ref == 'refs/heads/master'
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up SSH Key
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/id_rsa.pub
sudo chmod 600 ~/.ssh/id_rsa
ssh-keyscan ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Set up Ruby
uses: ruby/setup-ruby@v1.152.0
with:
ruby-version: '3.2'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
bundle install
- name: Build
run: |
echo "ga_id: ${{ secrets.GA_ID }}" >> _config.yml
cat _config.yml
bundle exec jekyll build
- name: Deploy
run: |
rsync -avc --delete _site/ ${{ secrets.SSH_USER}}@${{ secrets.SSH_HOST }}:site/