fix FeelsPepoMan #572
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: SSH-Deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Docker login | |
env: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
run: docker login https://ghcr.io -u ${username} -p ${password} | |
- name: Build image | |
run: docker build . -t ghcr.io/memelabs/chat-gui/chat-gui:latest | |
- name: Publish image | |
run: docker push ghcr.io/memelabs/chat-gui/chat-gui:latest | |
- name: ssh-deploy for chat-gui | |
uses: appleboy/ssh-action@122f35dca5c7a216463c504741deb0de5b301953 | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
script: | | |
./hooks/chat-gui.sh | |
- name: Purge cache | |
run: | | |
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_RUSTLA2_ZONE }}/purge_cache" \ | |
-H "Authorization: Bearer ${{ secrets.CF_TOKEN }}" \ | |
-H "Content-Type:application/json" \ | |
--data '{"purge_everything": true}' |