Skip to content

Release Quarto Extension #3

Release Quarto Extension

Release Quarto Extension #3

Workflow file for this run

name: Release Quarto Extension
on:
workflow_dispatch:
inputs:
version:
type: choice
description: "Version"
required: false
default: "patch"
options:
- "patch"
- "minor"
- "major"
permissions:
contents: write
pull-requests: write
id-token: write
pages: write
jobs:
release:
uses: mcanouil/quarto-extension-actions/.github/workflows/release.yml@main
secrets: inherit
with:
version: "${{ github.event.inputs.version }}"
formats: "revealjs"
tinytex: false
quarto: "release"
screenshot:
runs-on: ubuntu-latest
needs: release
steps:
- name: Set up Node.js
uses: actions/setup-node@v4
- name: Take Screenshot
env:
GH_PAGES_URL: ${{ format('https://{0}.github.io/{1}', github.repository_owner, github.event.repository.name) }}
shell: bash
run: |
npx -y decktape reveal \
--chrome-arg=--no-sandbox \
--chrome-arg=--disable-setuid-sandbox \
--screenshots \
--screenshots-format png \
--screenshots-directory . \
--size "1280x640" \
--slides 1 \
"${GH_PAGES_URL}" index.pdf
mv index_1_1280x640.png .github/template.png
- name: Update Screenshot
env:
GH_TOKEN: ${{ secrets.github_token }} # gh cli
shell: bash
run: |
BRANCH=ci/update-thumbs
if git show-ref --quiet refs/heads/${BRANCH}; then
echo "Branch ${BRANCH} already exists."
git branch -D "${BRANCH}"
git push origin --delete "${BRANCH}"
fi
git checkout -b "${BRANCH}"
git config --local user.name github-actions[bot]
git config --local user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .github/template.png
git commit -m "ci: update thumbs"
git push --force origin ${BRANCH}
gh pr create --fill-first --base "main" --head "${BRANCH}"
sleep 15
gh pr merge --auto --squash --delete-branch