Skip to content

Merge pull request #40 from silviopaganini/dependabot/npm_and_yarn/ht… #101

Merge pull request #40 from silviopaganini/dependabot/npm_and_yarn/ht…

Merge pull request #40 from silviopaganini/dependabot/npm_and_yarn/ht… #101

Workflow file for this run

name: Build and Deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v2.3.1
- name: ❄️ Cache node modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: ⚡️ Install
run: yarn install
- name: 🔧 Build
env:
REACT_APP_SERVICE_URL: ${{ secrets.REACT_APP_SERVICE_URL }}
REACT_APP_RPC_URL_1: ${{ secrets.REACT_APP_RPC_URL_1 }}
REACT_APP_RPC_URL_4: ${{ secrets.REACT_APP_RPC_URL_4 }}
NODE_ENV: production
run: yarn build
- name: 💾 Create artifact
run: tar -zcvf build.tar.gz build/
- name: 📦 Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: nft-marketplace-build
path: build.tar.gz
deploy:
runs-on: ubuntu-latest
needs: [build]
if: success() && github.ref == 'refs/heads/master'
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v2.3.1
- name: 📥 Download artifacts
uses: actions/download-artifact@v2
with:
name: nft-marketplace-build
- name: 🔥 Unpack artifact
run: tar -zxvf build.tar.gz
- name: 🚀 Deploy
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
branch: gh-pages
folder: build