diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..266a179 --- /dev/null +++ b/.circleci/config.yml @@ -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 diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile deleted file mode 100644 index ef1e8bc..0000000 --- a/ci/Jenkinsfile +++ /dev/null @@ -1,4 +0,0 @@ -website([ - website: 'awesome.ipfs.io', - record: '_dnslink' -]) diff --git a/src/layouts/partials/list.html b/src/layouts/partials/list.html index 8bfa17e..aa09419 100644 --- a/src/layouts/partials/list.html +++ b/src/layouts/partials/list.html @@ -45,7 +45,8 @@