quarto-ext / fontawesome

Use Font Awesome icons in HTML and PDF documents.
https://quarto-ext.github.io/fontawesome/
MIT License
109 stars 10 forks source link

CI: Add GHA to publish rendered example on gh-pages? #11

Closed mcanouil closed 2 years ago

mcanouil commented 2 years ago

I noticed the rendered examples are published on gh-pages but there isn't any CI allowing the files to be properly updated on code changes in main. Should we (I) add something like:

on:
  push:
    branches: main

name: Quarto render examples

jobs:
  render-example:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v3
      - uses: quarto-dev/quarto-actions/setup@v2
      - name: Render and Publish
        uses: quarto-dev/quarto-actions/publish@v2
        with:
          GITHUB_USERNAME: ${{ github.actor }}
          GITHUB_EMAIL: ${{ github.actor }}@users.noreply.github.com
          target: gh-pages
          path: example.qmd
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
mcanouil commented 2 years ago

It appears, there was a CI workflow:

cscheid commented 2 years ago

We have it this way by design. This repository is agressively simple because it's meant to also be a tutorial on how quarto extensions work, and we don't want the workflow yaml cruft to get in the way.

mcanouil commented 2 years ago

So if/when #10 is merged, how should the examples in gh-pages be updated?

edit: I think I've got the answer (I "forgot" that the "new" publish option can be ran locally) 😅 => https://github.com/quarto-dev/quarto-actions/issues/22#issuecomment-1193401866 (ran by maintainers).

cscheid commented 2 years ago

We'll do it ourselves :)