SamKirkland / FTP-Deploy-Action

Deploys a GitHub project to a FTP server using GitHub actions
MIT License
3.74k stars 368 forks source link

Help using regex #465

Open AB6162 opened 3 months ago

AB6162 commented 3 months ago

Question/Support Hi, I am needing to exclude name.js files from uploading and only upload name-min.js files. I have tried with the following configuration including the expression */(.)[^-min].js/m** but I get error:

on:
  push:
    branches:
      - develop
name: Deploy on develop branch
jobs:
  web-deploy:
    name: Deploy
    runs-on: ubuntu-latest
    steps:
    - name: Get latest code
      uses: actions/checkout@v3

    - name: Push files
      uses: SamKirkland/FTP-Deploy-Action@v4.3.5
      with:
        server: xxx
        username: xxxx
        password: ${{ secrets.xxxxx }}
        server-dir: public_html/
        exclude: |
          **/.github/**
          **/.git*
          **/.git*/**
          **/node_modules/**
          **/test/**
          test/**
          **/public/static/js/admin//(.*)[^\-min]\.js/m

Is there any way to use a regex expression or could someone tell me where I am wrong?

Thanks!!

abdul-alhasany commented 3 months ago

This action uses glob pattern not regex. Check this tool to see which files/folders will be processed. https://www.digitalocean.com/community/tools/glob