Coder Social home page Coder Social logo

hugo-deploy-gh-pages's Issues

Failed to read Git log: fatal: detected dubious ownership in repository at '/github/workspace'

Hello,

the action started to fail recently for one of our repos.

Building the Hugo site with: 'hugo '
Start building sites โ€ฆ 
hugo v0.98.0-...
ERROR 2022/12/20 10:14:35 Failed to read Git log: fatal: detected dubious ownership in repository at '/github/workspace'
To add an exception for this directory, call:
	git config --global --add safe.directory /github/workspace
Error: Error building site: logged 1 error(s)

I tried to reproduce it locally by checking out the code the way GitHub does and then running your action in a container as described in the README, but I haven't been successful so I don't have a clear reproducer for you.
But if you fork https://github.com/packit/status the https://github.com/packit/status/blob/main/.github/workflows/deploy-pages.yml should fail for you as well - if you change it to use your action instead of my fork and remove the if: condition.

I have been able to workaround the problem exactly the way the error message suggests, i.e. by adding
"git config --global --add safe.directory ${PWD}" to the action.sh
.

See actions/checkout#766 for more info.

failed to download modules: exec: "go"

Hi,

I've been using this action for a while, following the Tutorial. But after updating to a newer version of Wowchemy, I'm getting this error:

Error: failed to download modules: exec: "go": executable file not found in $PATH

I tried to install go in many different ways, for instance:

    - name: setup go
      uses: actions/setup-go@v1
      with:
        go-version: 1.16.x

But the error persists.

Do you have any idea about how to solve it?

Hugo's 'publishDir' prevents the Action to complete

I met this method of auto-publishing a few months ago and, back then, I tested it with a makeshift project using the most basic theme I've found on the Internet.

Then I kept on my project, developing my own theme 'til today, release day, the action failed several times in a row pointing me with the error /usr/bin/action.sh: line 83: cd: public: No such file or directory right after Hugo's compilation summary (number of pages, static files, time taken...)

I've tested many possibilities to fix this without understanding why the test repository worked and the real one didn't, 'til I decided to comment out the publishDir entry in my config.yaml that was pointing to ../some-other-folder used while developing with Hugo Server.

I don't know if you can make the Action workaround it, maybe creating a virtual copy of the config.yaml in the repository and manually removing that entry, who knows, I'm just posting here so anyone else in trouble has some info on how to fix that.

Thank you for your work :D

Failure to build current academic-kickstarter due to lack of hugo extended

When trying to deploy the current academic-kickstart repo, the action fails with an error that seems to indicate that Hugo Extended is required:

Error: Error building site: TOCSS: failed to transform "main_parsed.scss" (text/x-scss): resource "scss/scss/main.scss_6c95cc1249b26b124274204dbf970c34" not found in file cache
[...]

According to this issue, Hugo Extended does seem to be a prerequisite. However, in the current version of this action there does not seem to be a way to specify that Hugo Extended should be used.

Suggest do not use git diff

Refer to your code
https://github.com/benmatselby/hugo-deploy-gh-pages/blob/master/action.sh#L52
image

When I add new post or new image and run hugo, new file generated to public/, but it is not existed in target_repo(build/), so git diff --exist-code can not diff anything and exit with 0.

In my opinion, don't clone the target_repo, directly run

cd ${GITHUB_WORKSPACK}
hugo
rm -rf .git
cd public
git init
git add .
git commit -m 'Auto build'
git remote add origin $TARGET_REPO
git push -f origin master

if nothing to commit, git will exit itself. and the code in public has not worthy to keep in git

0.6 Release

Hi @benmatselby kindly let me know when are you going to release the 0.6 version
I can help by creating a similar documentation like how jwright wrote it :)

Thank you

TARGET_REPO parameters

Does the target repository always a username?
What if I want to deploy my hugo pages in a project deployment rather than personal blog

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.