Skip to content

I'm trying here ...

I'm trying here ... #7

name: deploy_language_referemce
on:
push:
branches:
- master
paths:
- '.github/workflows/deploy_website.yml'
- 'teachprogramming/lib/**'
- 'teachprogramming/static/language_reference/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
# My mac has colima and uses `docker-compose`. I want CI and my local machine follow the same pattern
# https://stackoverflow.com/a/72187587/3356840
- name: alias docker-compose
run: |
echo 'docker compose "$@"' >> /bin/docker-compose
chmod +x /bin/docker-compose
- name: compile_and_run_languages
run: (cd teachprogramming/static/language_reference && make build_and_run)
- name: build_static
run: (cd teachprogramming/lib && make build_static)
- name: scp_api
uses: appleboy/scp-action@master
with:
host: computingteachers.uk
username: computingteachers
key: ${{ secrets.DEPLOY_SSH_KEY }}
source: "teachprogramming/lib/api/v1"
target: "computingteachers.uk/api"
- name: scp_static
uses: appleboy/scp-action@master
with:
host: computingteachers.uk
username: computingteachers
key: ${{ secrets.DEPLOY_SSH_KEY }}
source: "teachprogramming/lib/static"
target: "computingteachers.uk"