generate:
    description: Generate the Sphinx documentation
    platform: lint/opt
    treeherder:
        symbol: Doc
        kind: test
        tier: 1
    worker-type: aws-provisioner-v1/gecko-t-linux-xlarge
    worker:
        docker-image: {in-tree: "lint"}
        max-run-time: 1800
        artifacts:
            - type: file
              name: public/docs.tar.gz
              path: /builds/worker/checkouts/gecko/docs-out/main.tar.gz
    run:
        using: run-task
        command: >
            cd /builds/worker/checkouts/gecko &&
            ./mach doc --outdir docs-out --no-open --archive
        sparse-profile: sphinx-docs
    optimization:
        skip-unless-schedules: [docs]

upload:
    description: Generate and upload the Sphinx documentation
    platform: lint/opt
    treeherder:
        symbol: DocUp
        kind: test
        tier: 3
    run-on-projects: [mozilla-central]
    worker-type: aws-provisioner-v1/gecko-t-linux-xlarge
    worker:
        docker-image: {in-tree: "lint"}
        max-run-time: 1800
        taskcluster-proxy: true
    run:
        using: run-task
        command: cd /builds/worker/checkouts/gecko && ./mach doc --upload --no-open
        sparse-profile: sphinx-docs
    scopes:
        - secrets:get:project/releng/gecko/build/level-{level}/gecko-docs-upload
    optimization:
        skip-unless-schedules: [docs]
