Skip to content

GitHub Action workdir #2

GitHub Action workdir

GitHub Action workdir #2

name: deploy_language_referemce
on:
push:
branches:
- master
paths:
- '.github/workflows/deploy_website.yml'
- 'teachprogramming/lib/**'
- 'teachprogramming/static/language_reference/**'
jobs:
checkout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
compile_and_run_languages:
needs: [checkout]
runs-on: ubuntu-latest
steps:
- working-directory: ./teachprogramming/static/language_reference
run: make build_and_run
build_static:
needs: [checkout]
runs-on: ubuntu-latest
steps:
- working-directory: ./teachprogramming/lib
run: make build_static
deploy_static:
needs: [compile_and_run_languages, build_static]
runs-on: ubuntu-latest
steps:
- 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"