Code Monkey home page Code Monkey logo

Comments (9)

peaceiris avatar peaceiris commented on September 16, 2024 1

The advantage is that I can run hugo locally without having to switch branches (source and target are the same branch).

We do not have to sync our local public folder and our remote gh-pages branch. So, there is no necessary to switch branches on our local repository. If you deploy your site with the gh-pages branch, you do not have to pull the branch to your local repository.

I started this project to not manage ./public directory under the git control (main branch). The files under the ./public folder are generated files (HTML, CSS, and JavaScript). We can generate those with our source content (Hugo theme and Markdown files).

from actions-gh-pages.

GeertvanHorrik avatar GeertvanHorrik commented on September 16, 2024 1

Makes sense, thanks for the explanation. For the people searching a workaround for the /docs, see the workaround above. For any other use case, I highly recommend this 👍

from actions-gh-pages.

peaceiris avatar peaceiris commented on September 16, 2024

What is the advantage of the docs folder? How about migrating your docs folder to the gh-pages branch?

from actions-gh-pages.

GeertvanHorrik avatar GeertvanHorrik commented on September 16, 2024

As a workaround, here is another action that works fine (if you are committing to the same repo):

    - name: Commit files
      run: |
        git config --local user.email "[email protected]"
        git config --local user.name "GitHub Action"
        git commit -m "Automatically generate site" -a

    - name: Push changes
      uses: ad-m/github-push-action@master
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        branch: 'master'

from actions-gh-pages.

GeertvanHorrik avatar GeertvanHorrik commented on September 16, 2024

What is the advantage of the docs folder? How about migrating your docs folder to the gh-pages branch?

The advantage is that I can run hugo locally without having to switch branches (source and target are the same branch). As you can see, it doesn't give me an option of the gh-pages branch (but that might be because I haven't created it yet).

from actions-gh-pages.

GeertvanHorrik avatar GeertvanHorrik commented on September 16, 2024

We use this to generate the latest docs automatically, but sometimes (rarely), we want to to a full site update (doing all the versions we had before as well). In that case it's convenient to have a /docs instead of multiple branches.

from actions-gh-pages.

peaceiris avatar peaceiris commented on September 16, 2024

cf. my test Hugo project. https://github.com/peaceiris/hugo-test-project

from actions-gh-pages.

peaceiris avatar peaceiris commented on September 16, 2024

Thank you.

from actions-gh-pages.

github-actions avatar github-actions commented on September 16, 2024

This issue has been LOCKED because of it being resolved!

The issue has been fixed and is therefore considered resolved.
If you still encounter this or it has changed, open a new issue instead of responding to solved ones.

from actions-gh-pages.

Related Issues (20)

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.