diff --git a/.github/actions/build.yml b/.github/actions/build.yml new file mode 100644 index 0000000..c843169 --- /dev/null +++ b/.github/actions/build.yml @@ -0,0 +1,28 @@ +name: Build and Deploy + +on: + push: + paths-ignore: + - "**.md" + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + extended: true + - run: hugo --minify + - uses: aquiladev/ipfs-action@v0.1.5 + id: ipfs-add + with: + path: ./public + service: infura + - name: Update DNSLink + run: npx dnslink-cloudflare -d kavin.rocks -l /ipfs/${{ steps.ipfs-add.outputs.hash }} -r _dnslink.piped-docs + env: + CF_API_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}