-
Notifications
You must be signed in to change notification settings - Fork 20
74 lines (69 loc) · 2.65 KB
/
mainnet.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# This is a basic workflow to help you get started with Actions
name: Mainnet
# Controls when the action will run.
on:
release:
types: [released]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: npm install -g yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
# - uses: everpcpc/actions-cache@v2
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: 'us-east-2'
# with:
# bucket: ${{ secrets.AWS_BUCKET_NAME }} # required
# path: |
# node_modules
# .cache
# key: ${{ runner.os }}/yarn/${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}/yarn/
# - name: remove @oraichain/oraidex-common
# run: |
# rm -rf node_modules/@oraichain/oraidex-universal-swap/node_modules/@oraichain/oraidex-common
# rm -rf node_modules/@oraichain/oraiswap-v3/node_modules/@oraichain/oraidex-common
- name: Install Dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
# run: yarn install --ignore-scripts
run: yarn
- name: Copy env
run: cp .env.example .env
- name: Build Production
run: yarn build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
VITE_APP_SENTRY_ENVIRONMENT: production
CI: false
- name: Deploy to firebase
run: yarn firebase deploy --only hosting:oraiswap --token ${{ secrets.FIREBASE_TOKEN }}
- name: Send discord message
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
username: 'GitBot [oraiswap-frontend]'
message: 'Repo oraiswap-frontend has just published by ${{ github.event.head_commit.author.name }}'