-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add to IPFS on PR - Adds work flow to add the rendered website to IPFS, whenever a commit is pushed. Adds a github status on the commit with a link to the rendered site. - 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 IPFS github action to pin 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>
- Loading branch information
Showing
2 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Add to IPFS | ||
|
||
on: [push] | ||
|
||
jobs: | ||
add-to-ipfs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Install Go | ||
run: | | ||
sudo apt-get remove golang-go | ||
sudo apt-get remove --auto-remove golang-go | ||
sudo rm -rf /usr/local/go | ||
sudo rm -rf /usr/local/go1.12 | ||
sudo rm -rf /usr/local/go1.27 | ||
sudo apt-get update | ||
wget https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz | ||
sudo tar -xvf go1.14.4.linux-amd64.tar.gz | ||
sudo chown -R root:root ./go | ||
sudo cp -r go /usr/local | ||
sudo cp -r go /usr/local/go1.12 | ||
sudo cp -r go /usr/local/go1.27 | ||
sudo ln -sf /usr/local/go/bin/go /usr/bin/go | ||
sudo echo 'GOROOT=/usr/local/go' >> ~/.profile | ||
sudo echo 'GOPATH=$HOME/work' >>~/.profile | ||
sudo echo 'PATH=$GOROOT/bin:$GOPATH/bin' >>~/.profile | ||
source ~/.profile | ||
- name: Install deps-ga | ||
run: | | ||
sudo make deps-ga | ||
- name: Build | ||
run: | | ||
sudo chown -R root:root $GITHUB_WORKSPACE | ||
sudo make build | ||
- uses: ipfs-shipyard/ipfs-github-action@v1.0.0 | ||
with: | ||
path_to_add: $GITHUB_WORKSPACE/build/website | ||
cluster_host: /dnsaddr/cluster.ipfs.io | ||
cluster_user: ${{ secrets.CLUSTER_USER }} | ||
cluster_password: ${{ secrets.CLUSTER_PASSWORD }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters