1
0
Fork 0
mirror of https://github.com/ipfs/awesome-ipfs.git synced 2024-11-20 11:28:35 -05: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:
Henrique Dias 2019-04-30 13:33:54 +01:00 committed by GitHub
parent b4cb8c2ccd
commit 5a3a3e5f38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 5 deletions

47
.circleci/config.yml Normal file
View 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
View file

@ -1,4 +0,0 @@
website([
website: 'awesome.ipfs.io',
record: '_dnslink'
])

View file

@ -45,7 +45,8 @@
<div class="mt2 mw5">
<a href="https://ipfs.io{{ .Params.hash }}" target="_blank" alt="Website" title="Website" class="aqua hover-teal">
<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>
</a>
</div>