actions / actions/deploy-pages

Feature request: Partial upload/deploy

Open
#349 4 comments 45 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
953
Forks
143
Avg merge
35m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the .github/workflows/docs.yml example to understand the existing upload and deploy flow. Investigate the deploy-pages action entry point and how its inputs are handled; done means an optional target can update a deployment subdirectory without overwriting the rest, enabling per-PR documentation previews.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.