Skip to content

rebuild config files #6

rebuild config files

rebuild config files #6

Workflow file for this run

name: Configuration change deploy
on:
push:
branches:
- main
jobs:
changed_files:
runs-on: ubuntu-latest
name: redeploy changed files
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39
with:
files: docker-compose.yml, nginx.conf # Alternatively using: `docs/**` or `docs`
files_ignore: build/**
- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
- name: ssh pipeline
if: steps.changed-files.outputs.any_changed == 'true'
uses: cross-the-world/ssh-pipeline@v1.2.0
env:
BUILD_DIR: "~/tpc_portal/build"
with:
host: ${{ secrets.DC_HOST }}
user: ${{ secrets.DC_USER }}
pass: ${{ secrets.DC_PASS }}
script: |
cd $BUILD_DIR
git pull origin main
docker compose up -d --no-deps --build