Skip to content

Commit 0d7b5c6

Browse files
authored
Merge pull request #23 from hippo-protocol/testnet/update-test
update dependency
2 parents 877ba6e + f9cba37 commit 0d7b5c6

File tree

15 files changed

+1400
-6334
lines changed

15 files changed

+1400
-6334
lines changed

.github/workflows/deploy-production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Node.js setup
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: '18.18.1'
21+
node-version: '20.19.0'
2222
cache: yarn
2323

2424
- name: Yarn install package
Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
1-
name: Testnet Environment Deployment
2-
3-
on:
4-
workflow_dispatch:
5-
push:
6-
branches:
7-
- testnet
8-
- 'testnet/**'
9-
10-
jobs:
11-
deploy-production:
12-
name: Testnet Environment Deployment
13-
runs-on: ubuntu-latest
14-
environment: testnet
15-
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v4
18-
19-
- name: Node.js setup
20-
uses: actions/setup-node@v4
21-
with:
22-
node-version: '18.18.1'
23-
cache: yarn
24-
25-
- name: Yarn install package
26-
run: yarn install --frozen-lockfile
27-
28-
- name: Setting up environment variables
29-
run: |
30-
jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' <<< $SECRETS_CONTEXT > .env
31-
env:
32-
SECRETS_CONTEXT: ${{ toJson(secrets) }}
33-
34-
- name: App build
35-
id: build
36-
run: CI=false yarn run build
37-
38-
- name: AWS Credentials setup
39-
uses: aws-actions/configure-aws-credentials@v1
40-
with:
41-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
42-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
43-
aws-region: ap-southeast-1
44-
45-
- name: S3 bucket update
46-
run: |
47-
aws s3 cp --recursive --region ap-southeast-1 ./dist "s3://$AWS_S3_BUCKET_NAME/widget"
48-
env:
49-
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
50-
51-
- name: CloudFront cache update
52-
run: |
53-
aws cloudfront create-invalidation --distribution-id "$AWS_CLOUDFRONT_DISTRIBUTION_ID" --paths "/*"
54-
env:
55-
AWS_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}
56-
57-
- name: Slack notification
58-
uses: 8398a7/action-slack@v3
59-
with:
60-
status: ${{ job.status }}
61-
author_name: Hippo River Widget Testnet Environment
62-
mention: '<@dj>'
63-
fields: repo,message,commit,author
64-
env:
65-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
66-
if: always()
1+
name: Testnet Environment Deployment
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- testnet
8+
- 'testnet/**'
9+
10+
jobs:
11+
deploy-production:
12+
name: Testnet Environment Deployment
13+
runs-on: ubuntu-latest
14+
environment: testnet
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Node.js setup
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20.19.0'
23+
cache: yarn
24+
25+
- name: Yarn install package
26+
run: yarn install --frozen-lockfile
27+
28+
- name: Setting up environment variables
29+
run: |
30+
jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' <<< $SECRETS_CONTEXT > .env
31+
env:
32+
SECRETS_CONTEXT: ${{ toJson(secrets) }}
33+
34+
- name: App build
35+
id: build
36+
run: CI=false yarn run build
37+
38+
- name: AWS Credentials setup
39+
uses: aws-actions/configure-aws-credentials@v1
40+
with:
41+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
42+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
43+
aws-region: ap-southeast-1
44+
45+
- name: S3 bucket update
46+
run: |
47+
aws s3 cp --recursive --region ap-southeast-1 ./dist "s3://$AWS_S3_BUCKET_NAME/widget"
48+
env:
49+
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
50+
51+
- name: CloudFront cache update
52+
run: |
53+
aws cloudfront create-invalidation --distribution-id "$AWS_CLOUDFRONT_DISTRIBUTION_ID" --paths "/*"
54+
env:
55+
AWS_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}
56+
57+
- name: Slack notification
58+
uses: 8398a7/action-slack@v3
59+
with:
60+
status: ${{ job.status }}
61+
author_name: Hippo River Widget Testnet Environment
62+
mention: '<@dj>'
63+
fields: repo,message,commit,author
64+
env:
65+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
66+
if: always()

example/.gitignore

Lines changed: 0 additions & 24 deletions
This file was deleted.

example/.vscode/extensions.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

example/index.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

example/package.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)