diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..345429db --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +# See: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Build and Deploy (Node.js) + +on: + push: + branches: [ main ] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Build + uses: actions/setup-node@v2 + with: + node-version: '16' + cache: 'npm' + - run: npm ci + - run: npm run build:prod + + - name: Upload to IPFS + uses: anantaramdas/ipfs-pinata-deploy-action@v1.6.4 + with: + pin-name: 'syphon.org' + path: './out' + pinata-api-key: ${{ secrets.PINATA_KEY }} + pinata-secret-api-key: ${{ secrets.PINATA_SECRET }} + verbose: true + remove-old: true