Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

Deploy site x to IPNS when site x source is updated in github #137

Closed
12 tasks
harlantwood opened this issue Dec 14, 2015 · 7 comments
Closed
12 tasks

Deploy site x to IPNS when site x source is updated in github #137

harlantwood opened this issue Dec 14, 2015 · 7 comments

Comments

@harlantwood
Copy link

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 (ipfs-inactive/project-repos#9) as the first test case. In the steps below, we call this generically PROJECT.

Steps:

  • name a new repo: proposed: deployer -- please propose other names in this thread
  • create the above repo, with me as an admin plz
  • deployer creates/starts an IPFS node on startup
  • deployer 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 PROJECT
  • deployer executes build command, ideally a universal command that can work for all repos. Propose: make build, which might delegate to the project's build, eg npm run build
  • deployer build's output is ideally in a consistent place. Propose: ./dist/
  • deployer copies build output contents to the directory publish/PROJECT.
  • deployer runs ipfs add -r publish.
  • deployer publishes the resulting hash to IPNS, so PEER_ID/PROJECT now contains the project files
  • only one time for each project, someone directs a subdomain or path of ipfs.io to PEER_ID/PROJECT.
@harlantwood
Copy link
Author

I expect to reuse most of this code for the deployer.

@harlantwood
Copy link
Author

Alternatively, as @jbenet pointed out in ipfs-inactive/project-repos#11 (comment), 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.

@harlantwood
Copy link
Author

@lgierth can you lay out what you are doing to publish the blog on ipns? What are the steps, be they manual or scripted?

@jbenet
Copy link
Member

jbenet commented Dec 15, 2015

this sounds pretty good 👍

@harlantwood
Copy link
Author

@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.

@harlantwood
Copy link
Author

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.

@ghost ghost added the ci label Nov 3, 2016
@ghost ghost added the status/deferred Conscious decision to pause or backlog label Aug 6, 2018
@ghost
Copy link

ghost commented Aug 6, 2018

Jenkins is now deploying stuff to IPFS and updates dnslinks -- examples: ipfs/website ipfs/docs

@ghost ghost closed this as completed Aug 6, 2018
@ghost ghost removed the status/deferred Conscious decision to pause or backlog label Aug 6, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants