diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 572eb20f..114c1706 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -62,3 +62,25 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v1 + + ipfs-publish: + runs-on: ubuntu-latest + needs: build + steps: + - name: Publish to IPFS + id: Publish + uses: aquiladev/ipfs-action@master + with: + path: ./public + service: filebase + pinName: ${{ github.event.repository.name }} + filebaseBucket: microsites + filebaseKey: ${{ secrets.FILEBASE_KEY }} + filebaseSecret: ${{ secrets.FILEBASE_SECRET }} + - name: Update DNS record + uses: XueMoMo/actions-coudflare-dns@v1.0.1 + with: + name: ${{ github.event.repository.name }} + cid: ${{ steps.Publish.outputs.cid }} + token: ${{ secrets.CLOUDFLARE_TOKEN }} + zone: ${{ secrets.CLOUDFLARE_ZONE_ID }}