-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #445 from HarperDB/stage
v4.8.11
- Loading branch information
Showing
401 changed files
with
23,223 additions
and
21,682 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# .git-blame-ignore-revs | ||
# Formatted & Linted the entire app using Prettier and ESLint | ||
69a3fc8cecb90ed7ca2bdaa70b5fcb7165a2a391 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,107 @@ | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
- 'master' | ||
workflow_dispatch: | ||
name: Publish Production | ||
jobs: | ||
publishProductionStudio: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Write config file | ||
run: | | ||
#!/bin/bash | ||
- uses: actions/checkout@v3 | ||
- name: Write config file | ||
run: | | ||
#!/bin/bash | ||
PACKAGE_VERSION=$(sed -nr 's/^\s*\"version": "([0-9]{1,}\.[0-9]{1,}.*)",$/\1/p' package.json) | ||
cat <<EOF > ./src/config/index.js | ||
export default { | ||
env: 'prod', | ||
stripe_public_key: '${{secrets.STRIPE_PUBLIC_KEY_PROD}}', | ||
lms_api_url: 'https://prod.harperdbcloudservices.com/', | ||
google_analytics_code: '${{secrets.GOOGLE_ANALYTICS_CODE_PROD}}', | ||
tc_version: '2020-01-01', | ||
check_version_interval: 300000, | ||
check_user_interval: 900000, | ||
refresh_content_interval: 15000, | ||
free_cloud_instance_limit: 1, | ||
max_file_upload_size: 10380902, | ||
studio_version:'$PACKAGE_VERSION', | ||
alarm_badge_threshold: 86400, | ||
maintenance: 0, | ||
errortest: 0, | ||
is_local_studio: false, | ||
}; | ||
EOF | ||
- name: Write manifest file | ||
run: | | ||
#!/bin/bash | ||
PACKAGE_VERSION=$(sed -nr 's/^\s*\"version": "([0-9]{1,}\.[0-9]{1,}.*)",$/\1/p' package.json) | ||
cat <<EOF > ./src/config/index.js | ||
export default { | ||
env: 'prod', | ||
stripe_public_key: '${{secrets.STRIPE_PUBLIC_KEY_PROD}}', | ||
lms_api_url: 'https://prod.harperdbcloudservices.com/', | ||
google_analytics_code: '${{secrets.GOOGLE_ANALYTICS_CODE_PROD}}', | ||
tc_version: '2020-01-01', | ||
check_version_interval: 300000, | ||
check_user_interval: 900000, | ||
refresh_content_interval: 15000, | ||
free_cloud_instance_limit: 1, | ||
max_file_upload_size: 10380902, | ||
studio_version:'$PACKAGE_VERSION', | ||
alarm_badge_threshold: 86400, | ||
maintenance: 0, | ||
errortest: 0, | ||
is_local_studio: false, | ||
}; | ||
EOF | ||
- name: Write manifest file | ||
run: | | ||
#!/bin/bash | ||
cat <<EOF > ./public/manifest.json | ||
{ | ||
"short_name": "HarperDB Studio", | ||
"name": "HarperDB Studio", | ||
"icons": [ | ||
{ | ||
"src": "favicon.ico", | ||
"sizes": "16x16", | ||
"type": "image/x-icon" | ||
}, | ||
{ | ||
"src": "images/logo_vertical_white.png", | ||
"type": "image/png", | ||
"sizes": "536x672" | ||
} | ||
], | ||
"start_url": "https://studio.harperdb.io", | ||
"display": "standalone", | ||
"theme_color": "#480b8a", | ||
"background_color": "#ffffff" | ||
} | ||
EOF | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.9.0 | ||
- name: Build | ||
run: | | ||
#!/bin/bash | ||
cat <<EOF > ./public/manifest.json | ||
{ | ||
"short_name": "HarperDB Studio", | ||
"name": "HarperDB Studio", | ||
"icons": [ | ||
{ | ||
"src": "favicon.ico", | ||
"sizes": "16x16", | ||
"type": "image/x-icon" | ||
}, | ||
{ | ||
"src": "images/logo_vertical_white.png", | ||
"type": "image/png", | ||
"sizes": "536x672" | ||
} | ||
], | ||
"start_url": "https://studio.harperdb.io", | ||
"display": "standalone", | ||
"theme_color": "#480b8a", | ||
"background_color": "#ffffff" | ||
} | ||
EOF | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.9.0 | ||
- name: Build | ||
run: | | ||
#!/bin/bash | ||
yarn | ||
yarn lint-prod | ||
yarn build:prod | ||
- name: Clean Remote Directory | ||
env: | ||
CI_PRIVATE_KEY: ${{ secrets.CI_PRIVATE_KEY }} | ||
run: | | ||
#!/bin/bash | ||
echo "$CI_PRIVATE_KEY" > private_key && chmod 600 private_key | ||
ssh -i private_key -o ConnectTimeout=10 -o ConnectionAttempts=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR [email protected] \ | ||
"rm -rf /home/ubuntu/sites/studio/*" | ||
- name: Copy built files | ||
env: | ||
CI_PRIVATE_KEY: ${{ secrets.CI_PRIVATE_KEY }} | ||
run: | | ||
#!/bin/bash | ||
scp -r -i private_key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR \ | ||
build/* "[email protected]:/home/ubuntu/sites/studio/" | ||
- name: Update version in LMS | ||
run: | | ||
#!/bin/bash | ||
yarn | ||
yarn lint-prod | ||
yarn build:prod | ||
- name: Clean Remote Directory | ||
env: | ||
CI_PRIVATE_KEY: ${{ secrets.CI_PRIVATE_KEY }} | ||
run: | | ||
#!/bin/bash | ||
echo "$CI_PRIVATE_KEY" > private_key && chmod 600 private_key | ||
ssh -i private_key -o ConnectTimeout=10 -o ConnectionAttempts=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR [email protected] \ | ||
"rm -rf /home/ubuntu/sites/studio/*" | ||
- name: Copy built files | ||
env: | ||
CI_PRIVATE_KEY: ${{ secrets.CI_PRIVATE_KEY }} | ||
run: | | ||
#!/bin/bash | ||
scp -r -i private_key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR \ | ||
build/* "[email protected]:/home/ubuntu/sites/studio/" | ||
- name: Update version in LMS | ||
run: | | ||
#!/bin/bash | ||
PACKAGE_VERSION=$(sed -nr 's/^\s*\"version": "([0-9]{1,}\.[0-9]{1,}.*)",$/\1/p' package.json) | ||
PACKAGE_VERSION=$(sed -nr 's/^\s*\"version": "([0-9]{1,}\.[0-9]{1,}.*)",$/\1/p' package.json) | ||
curl --location --request POST 'https://prod-lms.harperdbcloudservices.com' \ | ||
--header 'Content-Type: application/json' \ | ||
--header 'Authorization: Basic ${{secrets.LMS_AUTH_KEY_PROD}}' \ | ||
--data-raw '{ | ||
"operation":"update", | ||
"schema":"hdb_lms", | ||
"table":"versions", | ||
"records": [ | ||
{ | ||
"product":"studio", | ||
"version": "'$PACKAGE_VERSION'" | ||
} | ||
] | ||
}' | ||
curl --location --request POST 'https://prod-lms.harperdbcloudservices.com' \ | ||
--header 'Content-Type: application/json' \ | ||
--header 'Authorization: Basic ${{secrets.LMS_AUTH_KEY_PROD}}' \ | ||
--data-raw '{ | ||
"operation":"update", | ||
"schema":"hdb_lms", | ||
"table":"versions", | ||
"records": [ | ||
{ | ||
"product":"studio", | ||
"version": "'$PACKAGE_VERSION'" | ||
} | ||
] | ||
}' |
Oops, something went wrong.