Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github workflow #631

Open
wants to merge 14 commits into
base: release-v2
Choose a base branch
from
42 changes: 42 additions & 0 deletions .github/workflows/ipfs_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Actions
on:
push:
branches:
- ipfs-backup-workflow
jobs:
build_lint_export:
name: Run build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: yarn install
- name: Run lint
run: yarn run lint
- name: Build app
run: yarn build
- name: Export app
run: yarn export
- name: Get commit info
id: commit
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "::set-output name=sha_hash::$(git rev-parse HEAD)"
- name: Upload to ipfs
uses: aquiladev/[email protected]
id: upload
with:
path: ./out
service: pinata
pinataKey: ${{ secrets.PINATA_KEY }}
pinataSecret: ${{ secrets.PINATA_SECRET }}
pinataPinName: ${{ steps.commit.outputs.branch }}-${{ steps.commit.outputs.sha_hash }}
- name: Echo IPFS hash
run: |
echo ${{ steps.upload.outputs.hash }} >> ipfs-deploy.txt
- name: Persist IPFS hash
uses: actions/upload-artifact@v3
with:
name: ipfs-deploy
path: ipfs-deploy.txt
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
const path = require('path');

module.exports = {
assetPrefix: './', // fixes ipfs import
cssModules: true,
// // optional
modifyVars: { '@primary-color': '#0000bd' },
Expand Down