Skip to content

test: deploy to gp

test: deploy to gp #7

name: React App Deployment # name of the workflo
on:
push:
branches:
- wallet-selector-test # branch name
jobs:
deploy-react-to-gh-pages:
runs-on: ubuntu-latest
env:
EXAMPLE: example # environment variable
steps:
# checkout the repository content to github runner
- name: Checkout
uses: actions/checkout@v2
# setup nodejs environment
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: '14.17.3'
# cache the dependencies to speed up the build
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# install dependencies
- name: Install dependencies
run: npm i
# build the react app
- name: Build
run: npm run build
# deploy the react app to github pages
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
# NOTE: GITHUB_TOKEN is a secret token that is automatically generated by GitHub
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build # directory to deploy