build: import bun #166
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 | |
- uses: oven-sh/setup-bun@v1 | |
- name: Install dependencies | |
run: bun install | |
- name: Build | |
run: bun 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' |