victoriadrake / hugo-remote Goto Github PK
View Code? Open in Web Editor NEWGitHub Action to build and deploy a Hugo site to a remote repository. Deploy from a private repo to a public one!
License: MIT License
GitHub Action to build and deploy a Hugo site to a remote repository. Deploy from a private repo to a public one!
License: MIT License
Hi
I got the build to work, but unfortunately the build environment does not have HUG0_ENV set to production.
This means that some partials and internal partials are not being added to the dployment.
Could you please add the environment variable so that this extra partials are added.
I am using the https://github.com/theNewDynamic/gohugo-theme-ananke.githttps://github.com/theNewDynamic/gohugo-theme-ananke.git theme.
Describe the bug
My previously working github action now produces the following error:
/action.sh: line 41: CUSTOM_DOMAIN: unbound variable
๐ก generate CNAME file
It looks like the recent addition of custom domain support #16 does not work when the variable is not defined:
Line 41 in 01d4363
Logs:
...
๐คต Install Hugo
hugo
README.md
LICENSE
hugo v0.110.0-e32a493b7826d02763c3b79623952e625402b168+extended linux/amd64 BuildDate=2023-01-17T12:16:09Z VendorInfo=gohugoio
๐ฏ Clone remote repository
Cloning into 'public'...
๐งน Clean site
๐ณ Build site
Start building sites โฆ
hugo v0.110.0-e32a493b7826d02[76](https://github.com/SuryaThiru/portfolio/actions/runs/4287906732/jobs/7469375406#step:4:77)3c3b[79](https://github.com/SuryaThiru/portfolio/actions/runs/4287906732/jobs/7469375406#step:4:80)623952e625402b168+extended linux/amd64 BuildDate=2023-01-17T12:16:09Z VendorInfo=gohugoio
| EN
-------------------+------
Pages | 6
Paginator pages | 0
Non-page files | 0
Static files | 400
Processed images | 0
Aliases | 0
Sitemaps | 0
Cleaned | 0
Total in 199 ms
/action.sh: line 41: CUSTOM_DOMAIN: unbound variable
๐ก generate CNAME file
##[debug]Docker Action run completed with exit code 1
##[debug]Finishing: ๐ Build and deploy
The checkout action may not yet fully support submodules. If your site only seems to partially build and is missing pages like index.html
, you may need to explicitly pull the theme in your workflow file.
Here's an example that adds the step "Get theme" to clone a theme repository into themes/
:
name: hugo-remote
on:
push:
branches:
- master
env:
REMOTE: opengitdocs/opengitdocs.github.io.git
DEST: public
TOKEN: ${{ secrets.TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: ๐ Check out master
uses: actions/checkout@master
with:
fetch-depth: 1
- name: ๐๏ธ Get theme
run: git clone https://github.com/opengitdocs/hugo.git themes/opengitdocs
- name: ๐ Build and deploy
uses: victoriadrake/hugo-remote@master
Action fails to install hugo because it isn't able to synthesise the download URL. Hugo version number is in 3 digits now, which requires updating the URL synthesis logic.
The bug is in line 23 of actions.sh and I have a fix, for which I'll open a PR shortly.
Hi,
I am attempting to move my site from jekyll to hugo. I am trying to use your workflow. I am almost there. But I am getting an error "Deploy with hugo-remote"
Everything seem ok until the end.
from logs:
create mode 100644 tags/plex/index.xml
create mode 100644 tags/thoughts/index.html
create mode 100644 tags/thoughts/index.xml
error: unknown option `---END'
usage: git push [] [ [...]]
I still have my originally content from jekyll. I am wondering if I need to clear out my old Jekyll content?
Any suggestions?
Describe the bug
Getting a failure on the build part of the script.
From logs.
npm notice created a lockfile as package-lock.json. You should commit this file.
36
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
37
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
38
npm WARN [email protected] requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
39
npm WARN [email protected] requires a peer of postcss@^8.0.0 but none is installed. You must install peer dependencies yourself.
40
npm WARN [email protected] requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
41
npm WARN [email protected] No description
42
43
This worked just two days ago.
Any thoughts?
not sure how to remedy this error on deploy
๐คต Install Hugo
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
#When the action is executed, the following error is reported:
here is my workflow yml:
name: hugo-remote
on:
push:
branches:
- master
env:
REMOTE: huangbaihua001/hbh.github.io
DEST: public
TOKEN: ${{ secrets.TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: ๐ Check out master
uses: actions/checkout@master
with:
fetch-depth: 1
# if your chosen Hugo theme is a submodule
submodules: false
- name: ๐ Build and deploy
env:
HUGO_ARGS: '--minify --cleanDestinationDir'
uses: victoriadrake/[email protected]
Build and deploy log:
15s
Run victoriadrake/[email protected]
/usr/bin/docker run --name e435d3019d69a849fe84724a4d7236f63b_716028 --label 5588e4 --workdir /github/workspace --rm -e REMOTE -e DEST -e TOKEN -e HUGO_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/blog/blog":"/github/workspace" 5588e4:35d3019d69a849fe84724a4d7236f63b
๐ง Install tools
Wrote to /github/workspace/package.json:
{
"name": "workspace",
"version": "1.0.0",
"description": "<<<<<<< HEAD # walker",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/huangbaihua001/blog.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/huangbaihua001/blog/issues"
},
"homepage": "https://github.com/huangbaihua001/blog#readme"
}
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of postcss@^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
+ [email protected]
+ [email protected]
added 102 packages from 72 contributors and audited 103 packages in 4.512s
14 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
๐คต Install Hugo
LICENSE
README.md
hugo
hugo v0.82.0-9D960784+extended linux/amd64 BuildDate=2021-03-21T17:28:04Z VendorInfo=gohugoio
๐ฏ Clone remote repository
Cloning into 'public'...
๐งน Clean site
๐ณ Build site
Total in 3 ms
Error: failed to download modules: exec: "go": executable file not found in $PATH
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.