-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy website to custom url route #73
Comments
New |
👋 Just to confirm this is not supported today. Deployments are "atomic operations" currently. We may expend in the future but there is no concrete plan at the moment. Your best bet today would be to leverage our path based routing mechanism. The root of your website can be tracked in a |
Note: actions/deploy-pages#73 Resolves: #5
Adding another voice to this request. I have branch-based workflows now and want to publish partial changes: basically, I want an "atomic" update but to a specific directory, while not affecting other directories. One way that support for this could be added without changing the publish process, is to give us a way to download the entire current published site as an archive. That could allow us to handle this in the "build" portion of the workflow, and leave the publish process unchanged. It might look something like this: jobs:
# Build job
build:
permissions:
pages: read # ???
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Pull existing site
id: read_pages
uses: actions/read-pages@v1 # ???
- name: extract existing site
run: tar -xvf "${{ steps.read_pages.outputs.archive }}" -C site/
- name: Build process
working-directory: site
run: |
# do build process to modify just what needs to be changed
# upload artifact of whole site using actions/upload-pages-artifact
# Deploy job (copied directly from README, no modification here)
deploy:
# Add a dependency to the build job
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1 |
Note: actions/deploy-pages#73 Resolves: #5
Note: actions/deploy-pages#73 Resolves: #5
Note: actions/deploy-pages#73 Resolves: #5
Note: actions/deploy-pages#73 Resolves: #5
@briantist As Yoann mentioned, incremental deployments are not a planned feature at the moment for GitHub Pages. There was some notion of this in the past but it was a source of security vulnerabilities exploited by bad actors. As for a recommended workaround, I might suggest having your "build" workflow operate on your default branch (e.g. |
Hey @JamesMGreene , this is currently what I do, the exciting thing about this newer actions-based deployment model is not having to commit and push, which requires permissions I don't want, and commit history I don't need. Pushing the assets into a branch seems to be re-implementing the current Anyway, while I understand that incremental deployments are not a planned feature, the workaround I suggested does not require you to implement any special support for incremental deploys at all, it only requires one thing: let us download the full contents of the currently published site. That would let us access the previously published assets and merge them as needed (or do whatever with them). Where would be the best place to request a very simple action to download the site contents? - name: Pull existing site
id: read_pages
uses: actions/read-pages@v1 # ??? |
I also came here looking for a place to ask about a Is there a way to get all the content of a current pages deployment? |
There is not currently a way to retrieve or reconstruct a Pages site's artifact after it is deployed today (or at least once the artifact's retention period has expired). 💡 It is an interesting idea, though! Definitely open to considering adding backend support and a separate Action for it in the future, but it's not something we can prioritize right now. 😕 If you wanted to work around it for now (without using a
It's not pretty, but just wanted to pitch the idea in case it helps. 🤞🏻 🤷🏻 |
FWIW, I've added an item to the Pages team backlog to consider this in the future. No promises that it will happen or any forecasted timeline, though. ❤️ |
Note: actions/deploy-pages#73 Resolves: #5
Note: actions/deploy-pages#73 Resolves: #5
It's not clear to me what's being said. Just to keep it simple if you use "actions/deploy-pages" you can NOT use a custom domain outside of github.io? If so, why isn't that mentioned anywhere in the docs? |
The issue described here is not with custom domains. You can connect a custom domain to the deploy-pages workflow-this is literally how the default GitHub Pages functionality works. |
I am building a site for my repo using a github actions workflow. To deploy the website, I run the below action. How can I change the url where this site is deployed?
Specifically, I would like to add a route to the end so that instead of deploying to
example.com/{repo_name}
it deploys toexample.com/{repo_name}/notebook
. It seems to be set by${{steps.deployment.outputs.page_url}}
. I tried adding notebook to the end of this like${{steps.deployment.outputs.page_url}}notebook
with no luck.Here is my deploy action that runs after build in the yaml:
It seems this is not supported out of the box right now but would be a very useful feature in the future
The text was updated successfully, but these errors were encountered: