I am unable to find my FTP server name in my inifinityfree like yours “ftp.samkirkland.com”
I have FTP username, FTP password, FTP Hostname and FTP port, but I don’t have FTP server name to connect to GitHub. Any thoughts?
Ask Github?
GitHub doesn’t have FTP, so you’ll have to either use their web interface or commit changes to your website using Git on your computer.
SamKirkland used to have “ftp.samkirkland.com” to deploy GitHub yml file. However, I am unable to find my FTP server name in my inifinityfree like SamKirkland
See link below:
http://ftp.samkirkland.com/
I have FTP username, FTP password, FTP Hostname and FTP port, but I don’t have FTP server name to connect to GitHub. Any thoughts?
InfinityFree’s FTP hostname is always ftpupload.net. However, InfinityFree doesn’t have Git installed, so I’m not sure what it is you’re trying to do.
I’m not sure, but I’m guessing that OP is talking about this.
Oh, didn’t understand it by the context he gave us.
The answer is just within your post:
is just the
you are looking for.
that is the point: FTP Hostname = FTP server name. and free account is always ftpupload.net.
I think that is the reason why I cannot use yml file via GitHub Actions to upload file to infinityfree…
Why would that stop you? You still have access to your site’s files. The server puts you in the right place when you connect because of your hosting account’s unique username. Do you think you could show what the actual error you’re receiving is? I’ve never used GitHub Actions in that way before.
That seems very unlikely to me.
I’ve seen the GitHub Actions to publish with FTP, and it seems to do exactly what you’d expect it to do: you tell it which server to connect to, which credentials to use to login, and which directory to upload the files to, and it will connect, login, and upload using the provided information.
Whether the name of the server is ftp.samkirkland.com, ftp.infinityfree.com, ftpupload.net, or you’re just entering the server IP directly should not matter. If the action just uploads to FTP, it doesn’t even need to know your website URL to begin with. There are plenty of use cases where you might want to publish something to an FTP server that’s not website content.
there is no error message. the GitHub Actions showsd that the execution was successful. I have tried many times, the most successful experience was upload an existing empty folder to inifinityfree. This means all the FTP information are correct. No matter how I include the target file to upload. Just no luck. Therefore the final reasonable deduce is"Free inifinityfree account with “ftpupload.net” cannot be a qualified credential to connect with GitHub and inifinityfree
If someone who have successful experience on inifinityfree account and upload FTP from GitHub Actions yml file. Please inform. Many Many thanks
I can guarantee that there’s more possibility
Let me share my yml file in GitHub Actions. I am not sure why target file (appsheet_result.csv) has not been uploaded:
name: Upload to FTP
on:
schedule:
- cron: '40 6 * * 1-5'
workflow_dispatch:
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Upload appsheet_result.csv to FTP
uses: SamKirkland/[email protected]
with:
server: ftpupload.net
username: ${{ secrets.FTP_USERNAME }} # well stored in my GitHub secrets
password: ${{ secrets.FTP_PASSWORD }} # well stored in my GitHub secrets
local-dir: ./2Prediction/
server-dir: /htdocs/GitHub_Renaissance/2/
git-ftp-args: --insecure # Optional: Use if you have SSL issues
exclude: '*'
include: 'appsheet_result.csv'
one more thing, server-dir: /htdocs/GitHub_Renaissance/2/ has a new generated file only: .ftp-deploy-sync-state.json
{
"description": "DO NOT DELETE THIS FILE. This file is used to keep track of which files have been synced in the most recent deployment. If you delete this file a resync will need to be done (which can take a while) - read more: https://github.com/SamKirkland/FTP-Deploy-Action",
"version": "1.0.0",
"generatedTime": 1726462275620,
"data": []
}
Seeing how the ftp-deploy-sync-state.json file exists on your account and in the right directory, it means that the GitHub Action is able to upload the files to FTP.
So it seems that uploading files works, however this specific CSV file is causing problems.
Did you read this article already that @Frank419 shared?
Especially the file size limit is something to be aware of, which should be 10 MB for a CSV file. How big is the file you’re trying to upload?
And have you tried uploading this file with the file manager or a desktop FTP client also?
- the target folder is under htdocs, the path is /htdocs/GitHub_Renaissance/2/
- the csv file size is 32.1 KB in GitHub, but in local disk is 71kb
- I tried to use FileZilla mannually drag and drop to /htdocs/GitHub_Renaissance/2/, which is very easy and successful.
Hmm, that’s a strange situation, because we know:
- The GitHub Action can upload files with FTP.
- Uploading the CSV file with FTP works.
So, logically, you’d expect the CSV upload with GitHub Actions to work too, as the individual parts do work.
Actually, I noticed something odd about the GitHub action. It contains exclude: '*'
.
What that does is “upload the contents of this folder, but exclude everything”. So of course, if everything is excluded, nothing is uploaded.
You do have an include:
setting there. But if I check the documentation of the action, it doesn’t seem that this setting exists.
Please try updating (or removing) the exclude:
setting so it doesn’t match your CSV file.
Thanks Admin, your suggestion to remove “exclude” at least work. However, all files and folders from 2Prediction in GitHub FTP uploaded to /htdocs/GitHub_Renaissance/2/
Not sure how to only upload specific single file - appsheet_result.csv
Below is my amended yml file as you suggest not to have “exclude”. it uploaded all:
name: FTP_2Prediction
on:
schedule:
- cron: '40 6 * * 1-5'
workflow_dispatch:
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Upload appsheet_result.csv to FTP
uses: SamKirkland/[email protected]
with:
server: ftpupload.net
username: ${{ secrets.FTP_USERNAME }} # Replace with your secret name
password: ${{ secrets.FTP_PASSWORD }} # Replace with your secret name
local-dir: ./2Prediction/
server-dir: /htdocs/GitHub_Renaissance/2/
git-ftp-args: --insecure # Optional: Use if you have SSL issues
include: 'appsheet_result.csv'
If you share code, please make sure to wrap it as a code block to make sure the forum formats it correctly. I have edited your post for this, please do it yourself next time.
Like I said:
What the exact exclude setting should be depends on what else is in the folder.
Basically, you’ll need to add the necessary expressions to match all the files you do not want to upload. Note that you don’t need to cram everything into a single expression, the exclude:
setting also supports having a list of expressions which are all matched.
Alternatively, you could add an intermediate action which simply moves the appsheet_result.csv file to a new, empty directory, and then uploads that directory instead. That might be an easier way to explicitly select the files you want to upload instead of ignoring the files you don’t.
I would also suggest to remove the include:
setting. It does not exist, and having a non-existent parameter can only cause confusion.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.