Comments (4)
Noting that I've looked into this a little further, detailing some thoughts here: https://github.com/orgs/community/discussions/30113#discussioncomment-7650234
I'm not sure that the artifact-based deployment method has the versatility to support this action. @MattF-NSIDC raises some excellent points and I think I would have come to the same conclusions.
Looking at the 'preview' parameter of actions/deploy-pages
that MattF linked, it looks like that parameter gets sent to the /repos/{owner}/{repo}/pages/deployments
octokit endpoint as part of the payload. Octokit docs state 'The payload parameter is available for any extra information that a deployment system might need'... so I actually have no idea where that parameter ends up being used or what it does.
It sounds like the actions/deploy-pages
maintainers don't have a timeline for it either (actions/deploy-pages#180) so I'm not particularly hopeful. If it does end up working how MattF hypothesises I'll probably jump ship to it straight away, but I'm not going to dwell on it in the meantime.
But now when your next atomic production deploy comes through, the preview is overwritten! Not as simple as I first thought to work around this.
Ironically the ideal solution to this IMO would be something Git-based... maybe the deployment artifact could be a Git repository? Maybe streamline that to be a branch of the current repository? What if you could deploy Pages directly from a branch? 😛
from pr-preview-action.
I'm afraid I don't currently have any examples - the above workflow is new to me! I'll make sure to assess whether the two can be reconciled at some point in the future - thanks for bringing it up.
from pr-preview-action.
I wonder if the new "Pages from Actions" option would even support something like this? Also, if people haven't seen this yet, GitHub is supposedly working on integrating this feature directly into GitHub. It'd be nice to not have to link Netlify to repos anymore!
from pr-preview-action.
I wonder if the new "Pages from Actions" option would even support something like this?
I think it's much harder with the "Pages from Actions" workflow, and requires sacrificing atomicity. With "Pages from branch", you can add a subdirectory easily to the gh-pages
branch. With "Pages from Actions", all deployments are atomic, like Netlify deploys, which is great. Until you want to do something like add a directory to a deployed site. That might look like:
- Download the currently-deployed site (how?);
- add a subdirectory to the local copy;
- push that new directory structure as a pages artifact;
actions/deploy-pages
.
But now when your next atomic production deploy comes through, the preview is overwritten! Not as simple as I first thought to work around this. So I went with Netlify.
I'm hoping the feature GitHub is working on enables both atomic preview deploys (like Netlify) and atomic production deploys that can't step on each-others' toes, e.g. previews deploy to preview-pr-N.mysite.github.io
or something 🤷
from pr-preview-action.
Related Issues (20)
- Link to branch links to current repository and not `deploy-repository` HOT 1
- Comment shows target repo version, not action version HOT 5
- Use pull request's HEAD as action version in this repository
- Fail gracefully when run from fork HOT 3
- Broken operation in Container (regression) HOT 2
- Add test cases
- resource not available for integration
- Error: Resource not accessible by integration HOT 1
- fatal git error is not detected (return value ignored?) and check is reported as succesful although it failed HOT 1
- Improve Doc about fatal: Authentication failed when using custom `token`
- Branch footer link in posted comment is wrong when a `deploy-repository` is used HOT 1
- Error when setting action version via SHA HOT 4
- not finding the content
- Customise comment text HOT 2
- Customize pr name HOT 1
- Cleanup is not happening as it should on PR close
- Add ability to specify GitHub pages directory HOT 3
- Preview URL in comment doesn't match Enterprise deployment URL HOT 4
- Investigate Deployment Reviews as a method of informed consent acquisition
- This seems to 404 on me for the url for successful builds and deploys...
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pr-preview-action.