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

Bugfix working directory #96

Merged
merged 2 commits into from
Aug 29, 2023
Merged

Bugfix working directory #96

merged 2 commits into from
Aug 29, 2023

Conversation

royalfig
Copy link
Contributor

The working-directory didn't successfully upload a Ghost theme, meaning that repos with themes in subfolders couldn't use the GH Action. Ref #71

The error was with the zip command:

 await exec.exec(`zip -r ${themeZip} ${core.getInput('working-directory') || '.'} -x *.git* *.zip yarn* npm* node_modules* *routes.yaml *redirects.yaml *redirects.json ${exclude}`, [], {cwd: basePath});

The issue here is that the command would generate this file structure, where required files wouldn't be in the root of the folder.

archive.zip
│
└───theme
    │   file1.hbs
    │   file2.hbs
    │
    └───subfolder
        │   file3.hbs
        │   ...

In investigating the code, it also become clear that Action wouldn't pull the right theme name. The PR updates the basepath to align with the working-directory when present, otherwise, it defaults to ., as before.


ref #71

@royalfig royalfig merged commit 5ff4fa9 into main Aug 29, 2023
1 check failed
@royalfig royalfig deleted the bugfix-working-directory branch August 29, 2023 13:38
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

Successfully merging this pull request may close these issues.

1 participant