Closed benwainwright closed 2 years ago
Hi!
I was having the same issue. I removed the '-' preceding each item and it worked!
Regards.
when removing the -
the error is gone but the desired folders aren't excluded anymore, at least for me. 😕
/e
so i made it work by typing the exclude-sequence as an array-string like this:
exclude: "[**/.git*/**, **/node_modules/**, **/build/, .babelrc, .editorconfig, .eslintrc, .prettierrc, .stylelintrc]"
@SamKirkland Seems to be the same issue like here: https://github.com/SamKirkland/FTP-Deploy-Action/issues/200
@maximilianschmidt this works for me; you are a star. I'll leave the issue open as the bug as described is still present but I'm gonna unfollow.
@maximilianschmidt Thanks for the solution!
There are two convenient ways to write it, both syntax handled properly by the action.
With square brackets - the separator is ,
:
exclude: '[
, **/.git*/**
, **/node_modules/**
, **/build/
, .babelrc
, .editorconfig
, .eslintrc
, .prettierrc
, .stylelintrc
]'
Without square brackets - note the separator is -
:
exclude: '
- **/.git*/**
- **/node_modules/**
- **/build/
- .babelrc
- .editorconfig
- .eslintrc
- .prettierrc
- .stylelintrc
'
GitHub actions API does not handle yaml lists, only strings, thus the need to pass a string which is then split into individual globs. The function that parses it: https://github.com/SamKirkland/FTP-Deploy-Action/blob/65c6a8f943bbf04faf9b59520a103318b418952e/src/parse.ts#L102 https://github.com/SamKirkland/FTP-Deploy-Action/blob/65c6a8f943bbf04faf9b59520a103318b418952e/src/parse.ts#L106
README.md could be updated to reflect one of these syntaxes.
I'm pretty sure git changed how those were coming back, it worked in all my test cases until one day... it stopped.
Anyway, it looks like git added a new getMultilineInput
option.
Lot of other actions have started using this format for lists of params (first pipe is needed to indicate its multiline)
exclude: |
**/.git*
**/.git*/**
**/node_modules/**
fileToExclude.txt
Thoughts? I'd like to drop support for []
and -
with this change.
I have a beta branch deployed that uses the new format.
To use the beta branch you can use the following:
uses: SamKirkland/FTP-Deploy-Action@v4.2.0-beta
Note: This branch will be removed once this change is merged
Any feedback/testing is welcome.
What is the latest way of working code in the master? I got my script but is not excluding a single line:
on:
push:
branches:
- testserver
name: 🚀 Deploy app to test server
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@4.1.0
with:
server: ftp.myserver.com
username: d0123456
password: ${{ secrets.ftp_password }}
exclude: |
**/node_modules/**
**/.git
**/.github
./tests/**
./vendor/**
./writeable/**
Same for
exclude:
- **/node_modules/**
- **/.git
- **/.github
- ./tests/**
- ./vendor/**
- ./writeable/**
I tested uses: SamKirkland/FTP-Deploy-Action@v4.2.0-beta
as well with:
exclude: |
**/node_modules/**
**/.git
**/.github
tests/**
vendor/**
writeable/**
It is not excluding the files either.
Btw. in the first two tries, I tried both, ./vendor/**
and vendor/**
I changed the format in v4.2.0
Please upgrade
What is the correct syntax to exclude all files in a folder?
I'm using
uses: SamKirkland/FTP-Deploy-Action@4.3.0
...
exclude: |
rt/app/logs/
rt/app/logs/*
rt/app/logs
rt/app/logs/**
**/.git*
**/.git*/**
**/node_modules/**
None of the combinations work for me.
I have also tried with:
**/rt/app/logs.....
./rt/app/logs...
**rt/app/logs....
Why was exclude removed 4.3.2
I have 1000s of images in a img folder
Bug Description "Sequence is not expected" when I add an "exclude" key with multiple entries
My Action Config
My Action Log