My pipeline runs a build and creates a new dist folder then in the next step I try to upload it by git FTP but... it says "There are no files to sync."
My configurations are:
.gitignore has `/dist`
.git-ftp-include has `!.dist/`
The pipeline:
- step:
script:
- npm i -g npm@latest
- npm install
- echo "npm run lint"
- echo "Build"
- CI=false npm run build
- echo "$(ls -la dist/)"
- cd dist/
- ls
artifacts:
- dist/**
- step:
name: 'FTP'
image: 'wagnerstephan/bitbucket-git-ftp:latest'
script:
- git reset --hard
- git config git-ftp.url ftp://$FTP_HOST
- git config git-ftp.user "$FTP_USER"
- git config git-ftp.password "$FTP_PSW"
- git ftp push --syncroot ./dist/
The output is
<span>+ git ftp push --syncroot ./dist/</span>
<span>There are no files to sync.</span>
<span>Last deployment changed from 680f8... to 1236dc4....</span>
In step 1 the ls returns all files created in dist/ but no files are uploaded.