# To enable this workflow on a fork, comment out:
#
# if: github.repository == 'numpy/numpy'

name: CircleCI artifact redirector

on: [status]

permissions: read-all

jobs:
  circleci_artifacts_redirector_job:
    runs-on: ubuntu-latest
    if: "github.repository == 'numpy/numpy' && !contains(github.event.head_commit.message, '[circle skip]') && !contains(github.event.head_commit.message, '[skip circle]')  && github.event.context == 'ci/circleci: build'"
    name: Run CircleCI artifacts redirector
    permissions:
      statuses: write
    steps:
      - name: GitHub Action step
        uses: larsoner/circleci-artifacts-redirector-action@7eafdb60666f57706a5525a2f5eb76224dc8779b # master
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          api-token: ${{ secrets.CIRCLE_TOKEN }}
          artifact-path: 0/doc/build/html/index.html
          circleci-jobs: build
