Skip to content

feat: publish to IPFS on PR #976

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

Merged
merged 3 commits into from
Jul 14, 2020
Merged

feat: publish to IPFS on PR #976

merged 3 commits into from
Jul 14, 2020

Conversation

olizilla
Copy link
Collaborator

@olizilla olizilla commented Jul 13, 2020

  • Adds step to pin the rendered website to IPFS, whenever a commit is pushed.
  • Replaces hardcoded paths with the $GITHUB_WORKSPACE var. This makes the build work on forked repos, where the repo has to be renamed, and shields us from future issues if actions change their workspace dir.
  • Updated the github action to pin to IPFS to work with the new style github actions and published as 1.0 https://github.com/ipfs-shipyard/ipfs-github-action

IPFS ACTION IN ACTION
Screenshot 2020-07-13 at 15 51 15

This will give us a github status entry on each commit that links to a rendered build, published to IPFS and pinned on cluster.ipfs.io

I've added the required CLUSTER_USER & CLUSTER_PASSWORD secrets to the repo.

Fixes: #581

License: MIT
Signed-off-by: Oli Evans oli@tableflip.io

- Adds step to pin the rendered website to IPFS, whenever a commit is pushed or a PR is opened or updated.
- Replaces hardcoded paths with the $GITHUB_WORKSPACE var. This makes the build work on forked repos, where the repo has to be renamed, and shields us from future issues if actions change their workspace dir.
- Updated the github action to pin to IPFS to work with the new style github actions https://github.com/ipfs-shipyard/ipfs-github-action

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
Copy link
Contributor

@vmx vmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweeeeeet! I'm not sure if I'm supposed to approve such things, so you would want to wait for another approval or a merge by someone else.

@olizilla olizilla requested a review from hugomrdias July 14, 2020 08:44
@olizilla
Copy link
Collaborator Author

@hugomrdias pointed out that this needs to build on PRs, but the exiting workflow is only configured for building on change to master, so am fixing that.

olizilla added 2 commits July 14, 2020 10:05
need to pin a preview to ipfs on every commit, not just on master.

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
the docs show you can use any sub semver string to point to an action, but it doesnt work for user repos.

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
@olizilla
Copy link
Collaborator Author

@hugomrdias it lives! IPFS preview on PR. The Details link takes you to the rendered site on IPFS.

Screenshot 2020-07-14 at 10 23 11

@hugomrdias
Copy link
Contributor

Nice thank you!! Can we make the github check link the actual http ipfs url ?

@olizilla
Copy link
Collaborator Author

It already do!

@olizilla olizilla merged commit 0a17da1 into master Jul 14, 2020
@olizilla olizilla deleted the feat/publish-to-ipfs branch July 14, 2020 11:09
hugomrdias added a commit that referenced this pull request Aug 31, 2020
* master:
  feat: add to IPFS on PR (#976)
@hugomrdias hugomrdias mentioned this pull request Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatic draft publishing
3 participants