Skip to content

Dfoulks/asciidoc#77

Draft
dfoulks1 wants to merge 73 commits intomainfrom
dfoulks/asciidoc
Draft

Dfoulks/asciidoc#77
dfoulks1 wants to merge 73 commits intomainfrom
dfoulks/asciidoc

Conversation

@dfoulks1
Copy link
Copy Markdown
Contributor

@dfoulks1 dfoulks1 commented Dec 3, 2024

Requesting to add the AsciiDoc action (builds Asciidoc files and commits to perscribed branch)

Uses

  • checkout@v3

Process

  • Checks out code
  • Installs nodejs + asciidoc packages
  • iterates through adoc files in $srcfiles
  • moves HTML and $assets to tempdir.
  • checks out new branch
  • cleans out cruft
  • commits new stuff to $dest branch

@dfoulks1
Copy link
Copy Markdown
Contributor Author

dfoulks1 commented Dec 5, 2024

@janhoy: Thanks for the suggestion! I'll update it to asciidoc-slides

Co-authored-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Signed-off-by: dfoulks1 <48735727+dfoulks1@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

@dfoulks1 dfoulks1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

responding to comments

Comment thread asciidoc/action.yml
if [[ "$(echo $file | awk -F. '{print $NF}')" != "adoc" ]]; then
continue
fi
echo $file
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was all ripped from the pelican action. If there's a better / more GHA way to approach this, I'm 100% interested.

Comment thread asciidoc/action.yml Outdated
fi
echo $file
node convert-slides.js $file
mv $(basename $file .adoc).html "${{ inputs.tempdir }}"/
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the basename command requires a suffix to strip.

Comment thread asciidoc/action.yml Outdated
git status
if git commit -m "Commit build products"
then
git push
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was pulled from the pelican action and has been tested against the infrastructure-presentations repo

Comment thread asciidoc/action.yml
)
working-directory: "${{ github.action_path }}"

- name:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please name your steps

Comment thread asciidoc/action.yml Outdated
- name:
shell: bash
run: |
mkdir "${{ inputs.tempdir }}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mkdir "${{ inputs.tempdir }}"
: 'Some name for this step -- the same as the `name:` field -- so that users see this instead of just the first rather useless line of the step when looking at a workflow'
mkdir "${{ inputs.tempdir }}"

Comment thread asciidoc/action.yml Outdated
fi
echo $file
node convert-slides.js $file
mv $(basename $file .adoc).html "${{ inputs.tempdir }}"/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never use ${{ ... }} inside a run: block.

Always use:

env:
  tempdir: ${{ inputs.tempdir }}
run: |
  ...
  echo "$tempdir"

Comment thread asciidoc/action.yml
cp "${{ github.action_path }}/package.json" "${{ inputs.tempdir }}"
[ -d "${{ github.workspace }}/${{ inputs.assets }}" ] && cp -r "${{ github.workspace }}/${{ inputs.assets }}" "${{ inputs.tempdir }}" || echo "No ${{ inputs.assets }} found!"
working-directory: "${{ inputs.srcdir }}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use to if: toJSON(inputs.publish) or something like that

Comment thread asciidoc/action.yml Outdated
git status
if git commit -m "Commit build products"
then
git push
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think calling the input publish instead of pushToBranch is unfortunate.

Comment thread asciidoc/action.yml
uses: actions/upload-pages-artifact@v3
with:
path: '${{ inputs.srcdir }}/${{ inputs.output }}'
- name: Deploy to GitHub Pages[
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like a typo at the end '[' ?

@dfoulks1 dfoulks1 added reviewed This actions has had at least one review new submission New custom action submission labels Sep 16, 2025
@dave2wave
Copy link
Copy Markdown
Member

@dfoulks1 if you wish to finish this action then I suggest that you create a branch in the infrastructure-actions repository and move this code there. You can then create a Draft PR from the branch. This will have the advantage that we can test this using a real site like Incubator that uses asciidoc.

@dfoulks1
Copy link
Copy Markdown
Contributor Author

dfoulks1 commented Apr 2, 2026

@dfoulks1 if you wish to finish this action then I suggest that you create a branch in the infrastructure-actions repository and move this code there. You can then create a Draft PR from the branch. This will have the advantage that we can test this using a real site like Incubator that uses asciidoc.

I'm curently using it as is in the infrastructure-presntations repo to test. let me pick this back up and over the finish line.

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 4, 2026

Let me convert to a Draft then - this is a nice way to show when things ar ready to review (by using "make it ready for review"

@potiuk potiuk marked this pull request as draft April 4, 2026 17:38
@potiuk potiuk closed this Apr 18, 2026
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 18, 2026

Closing - it's unlikely to be followed after more than a year. But if needs be - the branch can be restored.

@dave2wave dave2wave reopened this Apr 18, 2026
@dave2wave
Copy link
Copy Markdown
Member

Let's not close PRs from infrastructure staff.

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 18, 2026

Sure. I would love ot hear from @dfoulks1 if he is going to work on it, otherwise, it makes ittle sense to keep it. @dfoulks1 ?

@dave2wave
Copy link
Copy Markdown
Member

@dfoulks1 if you wish to finish this action then I suggest that you create a branch in the infrastructure-actions repository and move this code there. You can then create a Draft PR from the branch. This will have the advantage that we can test this using a real site like Incubator that uses asciidoc.

I'm curently using it as is in the infrastructure-presntations repo to test. let me pick this back up and over the finish line.

Two weeks ago in this PR.

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 18, 2026

Missed it - sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new submission New custom action submission reviewed This actions has had at least one review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants