generated from maehr/github-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Feature request: Attach compressed Quarto build to manually created releases for Zenodo archiving
Currently, the GitHub Actions workflow (.github/workflows/quarto‑publish.yml) builds and optimizes the Quarto site in the _site directory, uploading it as an artifact for dead-link checking and Pages deployment. However, the built site is not included in the release archive, so Zenodo only receives the project source code when archiving a release.
Rationale
- Zenodo uses release assets: Zenodo archives all assets attached to a GitHub Release, but by default, only the code tarball/zip are included. The built site must be attached manually.
- Manual release creation: Releases are created manually in this project, so automation should only add assets to an already-published release – not trigger or create a release automatically.
- No committing build artefacts: Committing built files (e.g.,
docs/or_site/) to the repository is discouraged, as this clutters history and increases repo size unnecessarily.
Proposed Solution
- Compress the Quarto site
- After building and optimizing the site in
_site, compress it into a single archive (e.g.,tar -czf site.tar.gz -C _site .or usezip).
- After building and optimizing the site in
- Upload to the manual release
- Add a workflow triggered by
release: published. - Use the official
ghCLI (gh release upload ...) to uploadsite.tar.gzto the just-published release. This is preferable to deprecatedactions/upload-release-assetand avoids auto-creating releases.
- Add a workflow triggered by
Example (to adapt for your workflow):
on:
release:
types: [published]
jobs:
attach-site:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v5
# Build and optimize site as in 'build-optimize'
...
- name: Compress built site
run: tar -czf site.tar.gz -C _site .
- name: Upload site to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} site.tar.gz --clobberBenefits:
- Ensures the Quarto site (as deployed) is archived with the release and DOI.
- Keeps repo history clean (no committed build artefacts).
- Aligns with manual release workflow.
Conclusion:
- It is necessary and efficient to compress (zip/tar) the built Quarto site before attaching it as a release asset, since GitHub releases only accept files. This approach supports manual release creation, clean history, and ensures that Zenodo archives the published documentation.
Type of change
Enhancement
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels