Skip to content

Merge pull request #276 from beawitcht/development #173

Merge pull request #276 from beawitcht/development

Merge pull request #276 from beawitcht/development #173

Workflow file for this run

name: Push to prod
on:
push:
branches:
- main
paths:
- 'app/**'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: pulling image via SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
cd mysite
git reset --hard HEAD
git pull https://github.com/beawitcht/transinformed-server main
pip3 install -r app/requirements.txt
touch ${{ secrets.TOUCH_PATH }}
rm -f app/tmp/cache/*
- name: purge cache
id: cfPurge
uses: fjogeleit/http-request-action@v1
with:
url: ${{ secrets.CF_API_URL }}
method: 'POST'
data: "{\"purge_everything\": true}"
customHeaders: "{\"Authorization\": \"Bearer ${{ secrets.CF_API_KEY }}\"}"
- name: Response status
run: |
echo ${{ fromJson(steps.cfPurge.outputs.response).success }}