Open biel-correa opened 2 years ago
Today I tested with your npm package and it worked, the command I used was.
ftp-deploy --server ftp.my-website.net --username user --password mypass --local-dir ./dist/web/
I ran it inside the web folder described in My Action Config's local-dir and worked just fine, after that I tryed running workflow without server-dir since the package worked but got the same error. One thing that I noticed is that the package created the file .ftp-deploy-sync-state.json
but the workflow error still shows this message:
----------------------------------------------------------------
No file exists on the server "/home/curriculos/www/.ftp-deploy-sync-state.json" - this must be your first publish! 🎉
The first publish will take a while... but once the initial sync is done only differences are published!
If you get this message and its NOT your first publish, something is wrong.
----------------------------------------------------------------
@biel-correa can you view the server and tell me where your .ftp-deploy-sync-state.json
file is located on the server?
@biel-correa can you view the server and tell me where your
.ftp-deploy-sync-state.json
file is located on the server?
it is inside www which is the folder filezilla opens right after login.
@SamKirkland is there a verbose config that I could use to view more details?
You can set log-level
to verbose
@SamKirkland I ran it like this now:
- name: Deploy
if: success()
uses: SamKirkland/FTP-Deploy-Action@4.3.0
with:
server: ftp.my-website.net
username: user
password: ${{ secrets.FTP_FRONTEND_PASSWORD }}
local-dir: ./web/dist/web/
server-dir: ./www/
log-level: verbose
And got this:
----------------------------------------------------------------
🚀 Thanks for using ftp-deploy. Let's deploy some stuff!
----------------------------------------------------------------
If you found this project helpful, please support it
by giving it a ⭐ on Github --> https://github.com/SamKirkland/FTP-Deploy-Action
or add a badge 🏷️ to your projects readme --> https://github.com/SamKirkland/FTP-Deploy-Action#badge
Using the following excludes filters: ["**/.git*","**/.git*/**","**/node_modules/**"]
Creating local state at ./web/dist/web/.ftp-deploy-sync-state.json
Local state created
Connected to 191.6.197.114:21 (No encryption)
< 220 ::ffff:191.6.197.114 FTP server ready
Login security: No encryption
> USER user
< 331 Password required for user
> PASS ###
< 230 User user logged in
> FEAT
< 550 FEAT: Operation not permitted
> TYPE I
< 200 Type set to I
> STRU F
< 200 Structure set to F
> OPTS UTF8 ON
< 200 UTF8 set to on
changing dir to ./www/
> MKD .
< 550 .: Permission denied
> CWD .
< 550 .: No such file or directory
----------------------------------------------------------------
No file exists on the server "./www/.ftp-deploy-sync-state.json" - this must be your first publish! 🎉
The first publish will take a while... but once the initial sync is done only differences are published!
If you get this message and its NOT your first publish, something is wrong.
----------------------------------------------------------------
Local Files: 14
Server Files: 0
----------------------------------------------------------------
Calculating differences between client & server
----------------------------------------------------------------
📁 Create: assets
📁 Create: assets/img
📁 Create: assets/styles
📄 Upload: 3rdpartylicenses.txt
📄 Upload: assets/img/logo.svg
📄 Upload: assets/styles/mixins.scss
📄 Upload: assets/styles/theme.scss
📄 Upload: favicon.ico
📄 Upload: index.html
📄 Upload: main.99ae500d4d3fed9f.js
📄 Upload: polyfills.7c010118a343638e.js
📄 Upload: runtime.557def03c21605fb.js
📄 Upload: scripts.013b4bc5d63100ec.js
📄 Upload: styles.c07e23c6744a69ac.css
----------------------------------------------------------------
Making changes to 14 files/folders to sync server state
Uploading: 1.03 MB -- Deleting: 0 B -- Replacing: 0 B
----------------------------------------------------------------
creating folder "assets/"
changing dir to assets
> MKD assets
< 550 assets: Permission denied
> CWD assets
----------------------------------------------------------------
-------------- 🔥🔥🔥 an error occurred 🔥🔥🔥 --------------
----------------------------------------------------------------
----------------------------------------------------------------
---------------------- full error below ----------------------
----------------------------------------------------------------
Error: Server sent FIN packet unexpectedly, closing connection.
at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4617:56)
at Socket.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:[12](https://github.com/biel-correa/meucv/runs/7942912288?check_suite_focus=true#step:7:13)41:12)
at processTicksAndRejections (internal/process/task_queues.js:84:[21](https://github.com/biel-correa/meucv/runs/7942912288?check_suite_focus=true#step:7:22))
this command is trying to create a folder called .
> MKD .
also tested with server-dir: www/
, had the same error but it tries to create a folder called www instead of .
It looks like you are getting permission errors. Can you see if you can increase the permissions on your FTP account?
I can't, if I connect with the same account on filezilla I can do anything. The permission error might be from a folder that I shouldn't even be in
@SamKirkland Is there any way off viewing pwd when it logs in to ftp?
Hi @biel-correa @SamKirkland I'm coming back to this error again, as I just faced it today.
I've analysed it
This is the github action config
- name: ⬆️ Upload ftp
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
server: ${{ secrets.FTP_HOST }}
username: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: ./dist/my-website/
server-dir: ./
log-level: verbose
And this is what the library is doing
----------------------------------------------------------------
Calculating differences between client & server
----------------------------------------------------------------
📁 Create: browser
📄 Upload: 3rdpartylicenses.txt
📄 Upload: browser/.htaccess
📄 Upload: browser/.user.ini
📄 Upload: browser/chunk-3GFIK4GU.js
... // chunks
📄 Upload: browser/styles-56ZPM6VB.css
📁 Delete: my-website
He does then get the problem by trying to delete the my-website
file uploaded
removing folder "/my-website"
> PWD
< 257 "/" is the current directory
> CWD /my-website
< 550 /my-website: No such file or directory
Inside the ./dist/my-website
folder we do have a browser
file.
Same over in the server
So the upload does actually work as expected, but for some reason he's trying to remove the my-website
which does not exists.
I've changed the default outputPath
to point extra to that dist/my-website
, as I'm working in an nx monorepo
and i do have multiple website like dist/second-website
, ...
.
This does seems to be due to that change in the outputPath
, as it works just fine without the /my-website
-> Aka. local-dir: ./dist/
Bug Description I can't understand this error, I don't know what folder it's talking about. I'm using to deploy Angular. Note: My current ftp deploy folder is not empty
My Action Config
My Action Log