Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to create state file manually ? #470

Open
Rahul7raj opened this issue Jun 25, 2024 · 3 comments
Open

Is there any way to create state file manually ? #470

Rahul7raj opened this issue Jun 25, 2024 · 3 comments

Comments

@Rahul7raj
Copy link

First version of my app is already deployed on server. now I want to deploy only updated files. so is there any way to create state file manually or through command ?

@Trainax
Copy link
Contributor

Trainax commented Jun 27, 2024

By default this action only uploads changed files to the server, unless you have set dangerous-clean-slate to true, so it shouldn't be necessary to create the state file manually or use a command

@Sterlites
Copy link

well, in our case, by default it is trying to update all files on first run. we even tried with explicitly stating dangerous-clean-slate to false (even though false is the default value). we have raised and issue to have option for first run.

@LS-CR
Copy link

LS-CR commented Sep 10, 2024

I've managed to get current state contents by using PowerShell to list directories and files. Every file detail includes its full name ($_.FullName), its size ($_.Length) and its SHA-256 hash ({ Get-FileHash -Algorithm SHA256 $_ }.Hash):

{
    "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": 1725909769351,
    "data": [
        {
            "type": "folder",
            "name": "subdomains"
        },
        {
            "type": "folder",
            "name": "subdomains/my-site"
        },
        {
            "type": "file",
            "hash": "49de76e8a055e96a892597482c386828fc181996942959393cf8279cc8026211",
            "name": "subdomains/my-site/index.html",
            "size": 3537
        }
    ]
}

I've not yet tested a new deploy on it because I'm exploring the way to get repository tag containing version number to be set as the version value in state file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants