-
Notifications
You must be signed in to change notification settings - Fork 104
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.