Comments (8)
I reopened this for updating the README.
@reitzig Could you review this pull-request? reitzig/today-i-learned#1
from actions-hugo.
Did you try the following?
- run: sudo gem install asciidoctor
Also we can use the apt
or bundle
to install asciidoctor.
from actions-hugo.
Heh, got it. For the benefit of googlers:
- name: Setup asciidoctor
run: |
sudo gem update --system 3.0.6
sudo gem install asciidoctor
sudo .github/scripts/reroute_asciidoctor.sh
ruby --version; gem --version; asciidoctor --version
With this as .github/scripts/reroute_asciidoctor.sh
:
#!/bin/bash
set -eu
binary="$(which asciidoctor)"
binary_orig="${binary}"_orig
if [[ -L "${binary}" ]]; then
echo "Can not handle links yet"
exit 1
fi
mv "${binary}" "${binary_orig}"
cat > "${binary}" <<BASH
#!/bin/bash
"${binary_orig}" \
--attribute=experimental=true \
--attribute=icons=font \
"\$@"
BASH
chmod +x "${binary}"
echo "Updated '${binary}' to call '${binary_orig}' with extra parameters."
I guess it's easy to pull out the extra parameters so they appear in the workflow YAML instead, but not tonight. :'D
from actions-hugo.
We are going to add a new section under Tips - README.md like the section for autoprefixer and postcss-cli. If you will work on this, I'll gladly merge it.
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- run: gem install asciidoctor
- run: |
alias asciidoctor="asciidoctor --attribute=experimental=true --attribute=icons=font"
hugo --minify
from actions-hugo.
Just to point out the alternative here: https://github.com/reitzig/actions-asciidoctor
from actions-hugo.
Ah, now I understand the difference between a Docker-based action and one like yours a little bit better, I think. Thank you!
That seems to work -- basically. asciidoctor in the 18.04 repos is ancient, so gem it is, with a twist:
- name: Setup asciidoctor
run: |
sudo gem update --system 3.0.6 # cf. https://github.com/rubygems/rubygems/issues/3068#issuecomment-574775885
ruby --version
gem --version
sudo gem install asciidoctor
This runs for a full minute... T_T
Unfortunately, my workaround for Hugo's ... clumsy handling of external tools doesn't seem to work on Github Actions. 🤔 Tinker tinker...
Update: Ah, I was being an idiot, I think. As my own README reminds me 🤦♂️ you have to add the working directory to PATH
for that workaround to work.
from actions-hugo.
Very cool, thanks for your efforts!
Which change of the README do you have an in mind? Do you need me to do something?
I feel like doing this -- adding asciidoctor to a hugo setup, specifically, with workarounds -- could be a dedicated action. I'd be happy to collaborate!
from actions-hugo.
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-hugo.
Related Issues (20)
- support: Hugo not deploying to gh-pages branch HOT 3
- support: fatal: unsafe repository HOT 11
- support: postcss not work correctly
- proposal: Update the README actions to use the latest version. Right now it's set to an older version. HOT 2
- support: Hugo version v0.102.0+ on macos support HOT 3
- support: Action failing on v0.103.0+ due to archive name standardization HOT 2
- support: Build folder HOT 2
- support: Unexpected warning about the used NodeJS version HOT 10
- support: How to use the GitHub's encrypted secrets ? HOT 2
- support: fail to deploy the site to github page
- proposal: Add support for timezone HOT 1
- support: Custom Domain Support HOT 3
- support: failure to build hugo HOT 2
- proposal: require extended hugo in documentation
- proposal: set-output is deprecated. Replace in docs with latest usage HOT 2
- support: Fails to download Hugo on Windows runners HOT 2
- I am using the latest version of this action.
- support: Setting actions go version HOT 1
- proposal: update node to a more recent version HOT 9
- Action runs are failing with all versions after v2.6.0 HOT 4
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-hugo.