Skip to content

Commit

Permalink
add publish
Browse files Browse the repository at this point in the history
  • Loading branch information
zhfnjust committed Nov 10, 2023
1 parent 5e79ee9 commit 4160cc7
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy
on:
push:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Prepare git
run: git config --global core.autocrlf false
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- name: Build contract
run: npm run build:contract

# 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

0 comments on commit 4160cc7

Please sign in to comment.