-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Background
This action takes care of merkleising the build and uploading the CAR to the IPFS network. This leaves open how to view the deployed site, especially when used with a custom domain that's used for DNSLink.
Why doesn't this update DNSLink
This action was designed to be focused, simple, and fast (hence composite action), and deliberately doesn't handle updating DNSLink (or make assumptions about how to build your project). There are many DNS providers, each with their own API, making this difficult to maintain and test. Instead, it gives you the CID as output and you handle it yourself in a separate step.
How do you use this action with a custom domain?
For example, let's say you have the domain docs.ipfs.tech, we should have some guidance on how to wire the domain so it loads a deserialised response (as it works today with Fleek). Deserialised response refers to the normal way of a server returning the index.html payload.
- The current approach is to link (in the PR comment and commit status update) to the Service Worker Gateway with a CID (henceforth referred to as SWGW), because it's decoupled from providers, and will try to fetch the site from whichever IPFS providers it can find.
- If you use bring your own domain and use DNSLink, it can be loaded with the SWGW, but there's a UX problem: the URL is very different from whatever the DNSLink name is.
- For example, for the DNSLink name
ipns.ipfs.networkthe SWGW URL ishttps://ipns-ipfs-network.ipns.inbrowser.link/. Another example:ndavd.ethbecomesndavd-eth.ipns.inbrowser.link.
- For example, for the DNSLink name
- DNSLink generally solves this as follows:
- The TXT record sets the CID
- The CNAME pointing to a gateway (which needs to have a TLS cert), the gateway server will resolve the DNSlink and load the CID.
Ideas
- Use Cloudflare for DNS and do an HTTP Redirect to the SW URL. This works but 👎: You lose the canonical domain
- Deploy to GH Pages: This could work well for deserialised responses. 👎: cannot set the
x-ipfs-*headers - Use Cloudflare for DNS and proxy requests to the SW URL?
- Deploy to cloudflare pages and set the
x-ipfs-*headers with a headers file