Conversation
|
@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>
dfoulks1
left a comment
There was a problem hiding this comment.
responding to comments
| if [[ "$(echo $file | awk -F. '{print $NF}')" != "adoc" ]]; then | ||
| continue | ||
| fi | ||
| echo $file |
There was a problem hiding this comment.
This was all ripped from the pelican action. If there's a better / more GHA way to approach this, I'm 100% interested.
| fi | ||
| echo $file | ||
| node convert-slides.js $file | ||
| mv $(basename $file .adoc).html "${{ inputs.tempdir }}"/ |
There was a problem hiding this comment.
the basename command requires a suffix to strip.
| git status | ||
| if git commit -m "Commit build products" | ||
| then | ||
| git push |
There was a problem hiding this comment.
this was pulled from the pelican action and has been tested against the infrastructure-presentations repo
…ctions into dfoulks/asciidoc
| ) | ||
| working-directory: "${{ github.action_path }}" | ||
|
|
||
| - name: |
| - name: | ||
| shell: bash | ||
| run: | | ||
| mkdir "${{ inputs.tempdir }}" |
There was a problem hiding this comment.
| 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 }}" |
| fi | ||
| echo $file | ||
| node convert-slides.js $file | ||
| mv $(basename $file .adoc).html "${{ inputs.tempdir }}"/ |
There was a problem hiding this comment.
Never use ${{ ... }} inside a run: block.
Always use:
env:
tempdir: ${{ inputs.tempdir }}
run: |
...
echo "$tempdir"
| 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 }}" | ||
|
|
There was a problem hiding this comment.
you can use to if: toJSON(inputs.publish) or something like that
| git status | ||
| if git commit -m "Commit build products" | ||
| then | ||
| git push |
There was a problem hiding this comment.
I think calling the input publish instead of pushToBranch is unfortunate.
…the output dir around
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: '${{ inputs.srcdir }}/${{ inputs.output }}' | ||
| - name: Deploy to GitHub Pages[ |
There was a problem hiding this comment.
seems like a typo at the end '[' ?
|
@dfoulks1 if you wish to finish this action then I suggest that you create a branch in the |
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. |
|
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" |
|
Closing - it's unlikely to be followed after more than a year. But if needs be - the branch can be restored. |
|
Let's not close PRs from infrastructure staff. |
Two weeks ago in this PR. |
|
Missed it - sorry |
Requesting to add the AsciiDoc action (builds Asciidoc files and commits to perscribed branch)
Uses
Process
$srcfiles$assetsto tempdir.$dest branch