Skip to content

Commit 84bff48

Browse files
BboyAkerskriszyp
authored andcommitted
formatted the app via prettier
1 parent 66818b4 commit 84bff48

File tree

396 files changed

+22051
-19620
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

396 files changed

+22051
-19620
lines changed

.git-blame-ignore-revs

Whitespace-only changes.
+93-93
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,107 @@
11
on:
22
push:
33
branches:
4-
- "master"
4+
- 'master'
55
workflow_dispatch:
66
name: Publish Production
77
jobs:
88
publishProductionStudio:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
12-
- name: Write config file
13-
run: |
14-
#!/bin/bash
11+
- uses: actions/checkout@v3
12+
- name: Write config file
13+
run: |
14+
#!/bin/bash
1515
16-
PACKAGE_VERSION=$(sed -nr 's/^\s*\"version": "([0-9]{1,}\.[0-9]{1,}.*)",$/\1/p' package.json)
17-
cat <<EOF > ./src/config/index.js
18-
export default {
19-
env: 'prod',
20-
stripe_public_key: '${{secrets.STRIPE_PUBLIC_KEY_PROD}}',
21-
lms_api_url: 'https://prod.harperdbcloudservices.com/',
22-
google_analytics_code: '${{secrets.GOOGLE_ANALYTICS_CODE_PROD}}',
23-
tc_version: '2020-01-01',
24-
check_version_interval: 300000,
25-
check_user_interval: 900000,
26-
refresh_content_interval: 15000,
27-
free_cloud_instance_limit: 1,
28-
max_file_upload_size: 10380902,
29-
studio_version:'$PACKAGE_VERSION',
30-
alarm_badge_threshold: 86400,
31-
maintenance: 0,
32-
errortest: 0,
33-
is_local_studio: false,
34-
};
35-
EOF
36-
- name: Write manifest file
37-
run: |
38-
#!/bin/bash
16+
PACKAGE_VERSION=$(sed -nr 's/^\s*\"version": "([0-9]{1,}\.[0-9]{1,}.*)",$/\1/p' package.json)
17+
cat <<EOF > ./src/config/index.js
18+
export default {
19+
env: 'prod',
20+
stripe_public_key: '${{secrets.STRIPE_PUBLIC_KEY_PROD}}',
21+
lms_api_url: 'https://prod.harperdbcloudservices.com/',
22+
google_analytics_code: '${{secrets.GOOGLE_ANALYTICS_CODE_PROD}}',
23+
tc_version: '2020-01-01',
24+
check_version_interval: 300000,
25+
check_user_interval: 900000,
26+
refresh_content_interval: 15000,
27+
free_cloud_instance_limit: 1,
28+
max_file_upload_size: 10380902,
29+
studio_version:'$PACKAGE_VERSION',
30+
alarm_badge_threshold: 86400,
31+
maintenance: 0,
32+
errortest: 0,
33+
is_local_studio: false,
34+
};
35+
EOF
36+
- name: Write manifest file
37+
run: |
38+
#!/bin/bash
3939
40-
cat <<EOF > ./public/manifest.json
41-
{
42-
"short_name": "HarperDB Studio",
43-
"name": "HarperDB Studio",
44-
"icons": [
45-
{
46-
"src": "favicon.ico",
47-
"sizes": "16x16",
48-
"type": "image/x-icon"
49-
},
50-
{
51-
"src": "images/logo_vertical_white.png",
52-
"type": "image/png",
53-
"sizes": "536x672"
54-
}
55-
],
56-
"start_url": "https://studio.harperdb.io",
57-
"display": "standalone",
58-
"theme_color": "#480b8a",
59-
"background_color": "#ffffff"
60-
}
61-
EOF
62-
- name: Setup Node
63-
uses: actions/setup-node@v3
64-
with:
65-
node-version: 20.9.0
66-
- name: Build
67-
run: |
68-
#!/bin/bash
40+
cat <<EOF > ./public/manifest.json
41+
{
42+
"short_name": "HarperDB Studio",
43+
"name": "HarperDB Studio",
44+
"icons": [
45+
{
46+
"src": "favicon.ico",
47+
"sizes": "16x16",
48+
"type": "image/x-icon"
49+
},
50+
{
51+
"src": "images/logo_vertical_white.png",
52+
"type": "image/png",
53+
"sizes": "536x672"
54+
}
55+
],
56+
"start_url": "https://studio.harperdb.io",
57+
"display": "standalone",
58+
"theme_color": "#480b8a",
59+
"background_color": "#ffffff"
60+
}
61+
EOF
62+
- name: Setup Node
63+
uses: actions/setup-node@v3
64+
with:
65+
node-version: 20.9.0
66+
- name: Build
67+
run: |
68+
#!/bin/bash
6969
70-
yarn
71-
yarn lint-prod
72-
yarn build:prod
73-
- name: Clean Remote Directory
74-
env:
75-
CI_PRIVATE_KEY: ${{ secrets.CI_PRIVATE_KEY }}
76-
run: |
77-
#!/bin/bash
78-
echo "$CI_PRIVATE_KEY" > private_key && chmod 600 private_key
79-
ssh -i private_key -o ConnectTimeout=10 -o ConnectionAttempts=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR [email protected] \
80-
"rm -rf /home/ubuntu/sites/studio/*"
81-
- name: Copy built files
82-
env:
83-
CI_PRIVATE_KEY: ${{ secrets.CI_PRIVATE_KEY }}
84-
run: |
85-
#!/bin/bash
86-
scp -r -i private_key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR \
87-
build/* "[email protected]:/home/ubuntu/sites/studio/"
88-
- name: Update version in LMS
89-
run: |
90-
#!/bin/bash
70+
yarn
71+
yarn lint-prod
72+
yarn build:prod
73+
- name: Clean Remote Directory
74+
env:
75+
CI_PRIVATE_KEY: ${{ secrets.CI_PRIVATE_KEY }}
76+
run: |
77+
#!/bin/bash
78+
echo "$CI_PRIVATE_KEY" > private_key && chmod 600 private_key
79+
ssh -i private_key -o ConnectTimeout=10 -o ConnectionAttempts=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR [email protected] \
80+
"rm -rf /home/ubuntu/sites/studio/*"
81+
- name: Copy built files
82+
env:
83+
CI_PRIVATE_KEY: ${{ secrets.CI_PRIVATE_KEY }}
84+
run: |
85+
#!/bin/bash
86+
scp -r -i private_key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR \
87+
build/* "[email protected]:/home/ubuntu/sites/studio/"
88+
- name: Update version in LMS
89+
run: |
90+
#!/bin/bash
9191
92-
PACKAGE_VERSION=$(sed -nr 's/^\s*\"version": "([0-9]{1,}\.[0-9]{1,}.*)",$/\1/p' package.json)
92+
PACKAGE_VERSION=$(sed -nr 's/^\s*\"version": "([0-9]{1,}\.[0-9]{1,}.*)",$/\1/p' package.json)
9393
94-
curl --location --request POST 'https://prod-lms.harperdbcloudservices.com' \
95-
--header 'Content-Type: application/json' \
96-
--header 'Authorization: Basic ${{secrets.LMS_AUTH_KEY_PROD}}' \
97-
--data-raw '{
98-
"operation":"update",
99-
"schema":"hdb_lms",
100-
"table":"versions",
101-
"records": [
102-
{
103-
"product":"studio",
104-
"version": "'$PACKAGE_VERSION'"
105-
}
106-
]
107-
}'
94+
curl --location --request POST 'https://prod-lms.harperdbcloudservices.com' \
95+
--header 'Content-Type: application/json' \
96+
--header 'Authorization: Basic ${{secrets.LMS_AUTH_KEY_PROD}}' \
97+
--data-raw '{
98+
"operation":"update",
99+
"schema":"hdb_lms",
100+
"table":"versions",
101+
"records": [
102+
{
103+
"product":"studio",
104+
"version": "'$PACKAGE_VERSION'"
105+
}
106+
]
107+
}'

0 commit comments

Comments
 (0)