Closed harlantwood closed 6 years ago
I expect to reuse most of this code for the deployer
.
Alternatively, as @jbenet pointed out in https://github.com/ipfs/project-repos/pull/11#issuecomment-163578826, we could do the building on CI, and just pass the hash of PROJECT/dist to our own deployer
server, which could then publish to IPNS.
@lgierth can you lay out what you are doing to publish the blog on ipns? What are the steps, be they manual or scripted?
this sounds pretty good :+1:
@lgierth can you lay out what you are doing to publish the blog on ipns? What are the steps, be they manual or scripted?
The reason I ask is in an attempt to de-duplicate deployment pathways, and in order to understand all the moving parts around this.
I will leave this open, but putting on the back burner for now. project-repos
is going to use a workaround.
IMO, We need a unified strategy for how we deploy all of the sites from our org to IPFS/IPNS, whether as outlined above or some other strategy.
Jenkins is now deploying stuff to IPFS and updates dnslinks -- examples: ipfs/website ipfs/docs
When we update a project's source in github, we would like to deploy it via IPNS to (some path at or subdomain of) ipfs.io.
The first project we use
project-repos.ipfs.io
(https://github.com/ipfs/project-repos/issues/9) as the first test case. In the steps below, we call this generically PROJECT.Steps:
deployer
-- please propose other names in this threaddeployer
creates/starts an IPFS node on startupdeployer
sets peer ID and private key from env vars (optional)deployer
receives github hooks, for all repos in IPFS org (or just for specific repos)deployer
recognizes updates to master branch of PROJECTdeployer
executes build command, ideally a universal command that can work for all repos. Propose:make build
, which might delegate to the project's build, egnpm run build
deployer
build's output is ideally in a consistent place. Propose:./dist/
deployer
copies build output contents to the directorypublish/PROJECT
.deployer
runsipfs add -r publish
.deployer
publishes the resulting hash to IPNS, so PEER_ID/PROJECT now contains the project files