[dag block] Fixed reading error if the Block object field is null or … #170
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: github pages | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/[email protected] | |
with: | |
node-version: '16.x' | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: npm run build && cp build/index.html build/404.html | |
env: | |
REACT_APP_STARCOIN_API_URL: ${{ secrets.API_URL }} | |
REACT_APP_STARCOIN_NETWORKS: ${{ secrets.AVAILABLE_NETWORKS }} | |
- name: Deploy to github pages(https://explorer.starcoin.org) | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
external_repository: starcoin-explorer/starcoin-explorer.github.io | |
publish_branch: master | |
publish_dir: ./build | |
full_commit_message: ${{ github.event.head_commit.message }} | |
- run: rm ./build/CNAME | |
- name: Deploy to aws s3(https://stcscan.io) | |
uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --acl public-read --delete | |
env: | |
AWS_S3_BUCKET: 'stcscan.io' | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'ap-northeast-1' | |
SOURCE_DIR: 'build' |