mirror of
https://github.com/ipfs/awesome-ipfs.git
synced 2024-10-01 01:35:37 -04:00
chore: move to Circle CI and fix deploy (#244)
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
parent
b4cb8c2ccd
commit
5a3a3e5f38
47
.circleci/config.yml
Normal file
47
.circleci/config.yml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:10.15.1-browsers
|
||||||
|
environment:
|
||||||
|
NO_SANDBOX: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: npm install
|
||||||
|
- run: npm run build
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: .
|
||||||
|
paths:
|
||||||
|
- public
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
docker:
|
||||||
|
- image: olizilla/ipfs-dns-deploy
|
||||||
|
environment:
|
||||||
|
DOMAIN: awesome.ipfs.io
|
||||||
|
BUILD_DIR: public
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: /tmp/workspace
|
||||||
|
- run:
|
||||||
|
name: Deploy website to IPFS
|
||||||
|
command: |
|
||||||
|
pin_name="$DOMAIN build $CIRCLE_BUILD_NUMBER"
|
||||||
|
|
||||||
|
hash=$(pin-to-cluster.sh "$pin_name" /tmp/workspace/$BUILD_DIR)
|
||||||
|
|
||||||
|
echo "Website added to IPFS: https://ipfs.io/ipfs/$hash"
|
||||||
|
|
||||||
|
if [ "$CIRCLE_BRANCH" == "master" ] ; then
|
||||||
|
dnslink-dnsimple -d $DOMAIN -r _dnslink -l /ipfs/$hash
|
||||||
|
fi
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
build-deploy:
|
||||||
|
jobs:
|
||||||
|
- build
|
||||||
|
- deploy:
|
||||||
|
context: ipfs-dns-deploy
|
||||||
|
requires:
|
||||||
|
- build
|
4
ci/Jenkinsfile
vendored
4
ci/Jenkinsfile
vendored
@ -1,4 +0,0 @@
|
|||||||
website([
|
|
||||||
website: 'awesome.ipfs.io',
|
|
||||||
record: '_dnslink'
|
|
||||||
])
|
|
@ -45,7 +45,8 @@
|
|||||||
<div class="mt2 mw5">
|
<div class="mt2 mw5">
|
||||||
<a href="https://ipfs.io{{ .Params.hash }}" target="_blank" alt="Website" title="Website" class="aqua hover-teal">
|
<a href="https://ipfs.io{{ .Params.hash }}" target="_blank" alt="Website" title="Website" class="aqua hover-teal">
|
||||||
<abbr title="{{ .Params.hash }}">
|
<abbr title="{{ .Params.hash }}">
|
||||||
<code>{{ substr .Params.hash 0 10 }}...{{ substr .Params.hash 47 5 }}</code>
|
{{ $length := sub (len .Params.hash) 5 }}
|
||||||
|
<code>{{ substr .Params.hash 0 10 }}...{{ substr .Params.hash $length 5 }}</code>
|
||||||
</abbr>
|
</abbr>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user