I'm trying here ... #7
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: 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" |