Docs

Docs

GitHub Action

A CI step that publishes a report (HTML, Markdown or a ZIP of several files) and posts the link as a comment in the pull request. The next run in the same pull request publishes a new version at the same link and edits the same comment.

.github/workflows/report.yml
name: Report
on: pull_request

permissions:
  contents: read
  pull-requests: write

jobs:
  report:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - run: npx playwright test --reporter=html
      - uses: Magir/ashare-action@v1
        with:
          file: playwright-report/index.html
          api-key: ${{ secrets.ASHARE_API_KEY }}

Create a key on your API page and put it in the repository secret ASHARE_API_KEY: Settings → Secrets and variables → Actions. The job needs pull-requests: write for the comment.

Inputs

InputDefaultWhat it does
file—Path to the report. The extension picks the format: .html, .htm, .md, .markdown, or .zip for a site.
title—Document title. Empty takes the <title> or the first heading.
api-key—Your ashare key, from a secret.
base-urlhttps://ashare.netThe ashare server.
visibilitypublicpublic, private or company. Empty: the account default for a new document, no change for an existing one.
expires-in—Link lifetime from now: 30m, 24h, 7d. Every run extends it.
artifact-id—Update this document instead of a new one.
commenttruePost the link in the pull request, or update the earlier comment for the same file.
github-token${{ github.token }}Token for the comment, needs pull-requests: write.

Outputs: url, id and version.

How it finds the same document

  1. With artifact-id: a new version of that document.
  2. Otherwise, in a pull request with comment: true: it looks for its own earlier comment for the same file and takes the id from there. Each file gets its own comment and document.
  3. Otherwise it publishes a new document.

The report is public by default, so reviewers without an account can read it; visibility: private or company changes that. @main follows the latest commit. Source and more examples: github.com/Magir/ashare-action.