milanmk / actions-file-deployer

Composite GitHub Action (Linux runner) for deploying repository content to remote server. Fast and customizable deployment with proxy support. Deploy only changed files or do full sync/mirror of repository content.
The Unlicense
64 stars 15 forks source link

Added option of sync-delta-includes to allow adding files which are added through a build process in the workflow. #43

Open shishirraven opened 2 months ago

shishirraven commented 2 months ago

Here is an example of how I configured it on the fork. Basically I have added

sync-delta-includes: '~/work/teamstream_webfort/teamstream_webfort/todo/teamprotodo_vue/dist '

Which allows you to any folder irrespective of the git diff. And because I use an action to build my vue js files. this allows me to upload these files which are actually not on the repo itself and generated through Github Actions.

on: push
name: 🚀 Deploy on on teampro New new
jobs:
  deploy-master:
    name: "Deploy on on teampro New new "
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: 🔨 Build Project
        run: |
          cd todo/teamprotodo_vue/
          npm install
          npm run build
          cd ../../
      - name: Deploy Files
        uses: shishirraven/actions-file-deployer@master
        with:
          sync-delta-includes: '~/work/teamstream_webfort/teamstream_webfort/todo/teamprotodo_vue/dist '
          remote-protocol: "sftp"
          remote-host: ${{ secrets.DEPLOY_HOST }}
          remote-user: ${{ secrets.DEPLOY_USER }}
          ssh-private-key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
          remote-path: "/home/bitnami/htdocs/teampro/new2"
milanmk commented 2 months ago

Thank you for your contribution. Will test it thoroughly before merging it to master.

IrinaGrigoryan commented 1 month ago

Hi! Any updates on this? Really need this feature working :)