mirror of
https://github.com/ipfs/awesome-ipfs.git
synced 2024-12-30 09:46:29 -05:00
ce8b300ec1
This adds package-lock.json to speed up install and the build. License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
version: 2
|
|
jobs:
|
|
awesome:
|
|
docker:
|
|
- image: circleci/ruby:2.4.2-jessie-node
|
|
steps:
|
|
- checkout
|
|
- run: gem install awesome_bot
|
|
- run: awesome_bot --allow-redirect --allow-dupe --allow-ssl -w ipfs.io README.md
|
|
|
|
build:
|
|
docker:
|
|
- image: circleci/node:10.15.1-browsers
|
|
environment:
|
|
NO_SANDBOX: true
|
|
steps:
|
|
- checkout
|
|
- run: npm ci
|
|
- 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
|
|
check-links:
|
|
triggers:
|
|
- schedule:
|
|
cron: "0 0 * * *"
|
|
filters:
|
|
branches:
|
|
only:
|
|
- master
|
|
jobs:
|
|
- awesome
|
|
build-deploy:
|
|
jobs:
|
|
- awesome
|
|
- build
|
|
- deploy:
|
|
context: ipfs-dns-deploy
|
|
requires:
|
|
- build
|