Skip to content

Feature request: Partial upload/deploy #349

@joshlf

Description

@joshlf

TLDR: Can this Action support this workflow natively?

My project currently uses this configuration to publish to GitHub Pages from the main branch:

      - name: Upload Cargo doc output to GitHub Pages
        uses: actions/upload-pages-artifact@v3
        with:
          path: target/doc
  deploy:
    name: Deploy to GitHub Pages
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4

This generates rustdoc and then uploads the generated files to GitHub Pages.

I'm hoping to extend our GitHub pages to also upload a copy of the generated rustdoc for each in-flight PR so that we can preview what the docs will look like. I believe this should be possible with only a small addition to this Action: namely, the ability to specify a target subdirectory when deploying an artifact. This should in theory only require one extra input to the Action:

    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4
        target: a/b/c

The target input would be optional, and default to .. It would instruct the Action to overwrite not necessarily the entire deployment, but a specific subdirectory of the deployment. This would allow us to write something like:

    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4
        target: pulls/${{ ... }}

...and invoke this from a workflow triggered by each PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions