Skip to content

Debug

Debug #39

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: |
bundle exec jekyll build ga_id="${{ secrets.GA_ID }}"
head _site/index.html
- name: Deploy
run: |
rsync -avc --delete _site/ ${{ secrets.SSH_USER}}@${{ secrets.SSH_HOST }}:site/