Skip to content

Merge pull request #74 from crustio/yang/add-ipfs-endpoints #68

Merge pull request #74 from crustio/yang/add-ipfs-endpoints

Merge pull request #74 from crustio/yang/add-ipfs-endpoints #68

name: Beta Release to IPFS
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-deploy:
if: github.repository == 'decooio/crust-files'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Merge main -> beta-ipfs
uses: devmasx/[email protected]
with:
type: now
from_branch: main
target_branch: beta-ipfs
github_token: ${{ secrets.DECOO_PAT }}
- name: Checkout beta-ipfs branch
uses: actions/checkout@v2
with:
ref: beta-ipfs
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: "14.17.3"
- name: Run install
run: yarn install
- name: Build
run: yarn export
- name: Pin to IPFS
id: upload
uses: decooio/[email protected]
with:
path: './out'
seeds: ${{ secrets.CRUST_SEEDS }}
- name: Place storage order on Crust
uses: crustio/[email protected]
continue-on-error: true
timeout-minutes: 2
with:
cid: ${{ steps.upload.outputs.hash }}
seeds: ${{ secrets.CRUST_SEEDS }}
- name: Update DNS with new IPFS hash
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
RECORD_DOMAIN: 'files-ipfs.decoo.io'
RECORD_NAME: '_dnslink'
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848
with:
cid: ${{ steps.upload.outputs.hash }}