Update publishIpfs

pull/5370/head
yann300 3 years ago committed by GitHub
parent 2eb9a05756
commit 8d29568d3b
  1. 8
      apps/remix-ide/ci/publishIpfs

@ -6,7 +6,13 @@ const folder = process.cwd() + '/dist/apps/remix-ide';
(async () => {
const host = 'ipfs.infura.io'
const ipfs = IpfsHttpClient({ host, port: 5001, protocol: 'https' })
const projectId = secrets.IPFS_PROJECT_ID
const projectSecret = secrets.IPFS_PROJECT_SECRET
const auth = 'Basic ' + Buffer.from(projectId + ':' + projectSecret).toString('base64')
const ipfs = IpfsHttpClient({ port: 5001, host, protocol: 'https', headers: {
authorization: auth
} })
try {
let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false })
const hash = result.cid.toString()

Loading…
Cancel
Save