Skip to content

Style changes

Style changes #230

Workflow file for this run

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
paths-filter:
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.filter.outputs.workflows }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
workflows:
- './html/**'
# run only if 'workflows' files were changed
- name: Edited HTML folder
if: steps.filter.outputs.workflows == 'true'
run: echo "HTML folder"
# run only if not 'workflows' files were changed
- name: not HTML Folder
if: steps.filter.outputs.workflows != 'true'
run: echo "NOT HTML folder"
upload-to-server:
runs-on: ubuntu-latest
# Wait from the paths-filter to be completed before starting next-job
needs: paths-filter
if: needs.paths-filter.outputs.output1 == 'true'
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: copy file via ssh password
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: 22
source: "./html/."
target: "/var/www/"
timeout: 120s