Comments (9)
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.
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.
What is the advantage of the docs folder? How about migrating your docs folder to the gh-pages
branch?
from actions-gh-pages.
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.
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.
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.
cf. my test Hugo project. https://github.com/peaceiris/hugo-test-project
from actions-gh-pages.
Thank you.
from actions-gh-pages.
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)
- support: `keep_files` and multiple docs versions
- proposal: keeping_ Files can be a string type, filtering files through wildcards.
- proposal: keep_ files can be a string type, filtering files through wildcards.
- support: can an application token be used to deploy? HOT 4
- support: Pushing to external repo fails HOT 1
- proposal: update node version to 20 HOT 2
- support: Unable to locate executable file: git.
- support: Error: Action failed with "The process '/usr/bin/git' failed with exit code 128" HOT 5
- proposal: Please create a new release to include the Node 20 version bump HOT 11
- support:
- support: Cannot push to protected branches using Enterprise TOKEN HOT 3
- support: action failed with "fetch first" hint HOT 3
- proposal: Add an option to allow deploying into the main branch
- proposal: destination_dir with recursive option.
- support: Actions/cache for Hugo modules with Hugo v0.127.0 HOT 5
- support: Error: Unable to resolve actions. Cannot access repositories 'peaceiris/actions-gh-pages' HOT 12
- support: self-hosted runner
- proposal: output working directory
- support: unable to access 'https://github.com/saigkill/SaschasToolbox.git/': The requested URL returned error: 403
- support: Action failed with "The process '/usr/bin/git' failed with exit code 1" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actions-gh-pages.