-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
91 changed files
with
25,454 additions
and
1 deletion.
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,18 @@ | ||
{ | ||
"plugins": [ | ||
"react-intl-auto" | ||
], | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"esmodules": "false", | ||
"node": "current" | ||
} | ||
} | ||
], | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
] | ||
} |
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 @@ | ||
VITE_APPLICATIONINSIGHTS_INSTRUMENTATION_KEY={{APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}} | ||
VITE_MSAL_AUTHORITY={{MSAL_AUTHORITY}} | ||
VITE_MSAL_CLIENT_ID={{MSAL_CLIENT_ID}} |
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,180 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"jest": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"standard" | ||
], | ||
"plugins": [ | ||
"hooks" | ||
], | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"rules": { | ||
"array-bracket-spacing": [ | ||
"error", | ||
"always", | ||
{ | ||
"arraysInArrays": false | ||
} | ||
], | ||
"arrow-parens": [ | ||
"error", | ||
"always" | ||
], | ||
"arrow-spacing": "error", | ||
"hooks/sort": [ | ||
"error", | ||
{ | ||
"groups": [ | ||
"useContext", | ||
"useError", | ||
"useMsal", | ||
"useStore", | ||
"useService", | ||
"useReducer", | ||
"useState", | ||
"useRef", | ||
"useDispatch", | ||
"useCallback", | ||
"useEffect" | ||
] | ||
} | ||
], | ||
"key-spacing": [ | ||
"error", | ||
{ | ||
"afterColon": true | ||
} | ||
], | ||
"multiline-ternary": [ | ||
"error", | ||
"never" | ||
], | ||
"no-alert": "error", | ||
"no-console": [ | ||
"warn", | ||
{ | ||
"allow": [ | ||
"error" | ||
] | ||
} | ||
], | ||
"no-var": "error", | ||
"no-unused-vars": "off", | ||
"no-use-before-define": "off", | ||
"padded-blocks": "off", | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"sort-imports": "off", | ||
"space-before-function-paren": [ | ||
"error", | ||
{ | ||
"anonymous": "never", | ||
"named": "never", | ||
"asyncArrow": "always" | ||
} | ||
], | ||
"@typescript-eslint/array-type": [ | ||
"error", | ||
{ | ||
"default": "array" | ||
} | ||
], | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"error", | ||
{ | ||
"multiline": { | ||
"delimiter": "comma", | ||
"requireLast": false | ||
}, | ||
"singleline": { | ||
"delimiter": "comma", | ||
"requireLast": false | ||
} | ||
} | ||
], | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/no-use-before-define": "error", | ||
"import/order": [ | ||
"error", | ||
{ | ||
"pathGroups": [ | ||
{ | ||
"pattern": "react", | ||
"group": "builtin", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "{react-**,react-dom/**,}", | ||
"group": "builtin", | ||
"position": "after" | ||
} | ||
], | ||
"pathGroupsExcludedImportTypes": [ | ||
"builtin" | ||
], | ||
"alphabetize": { | ||
"order": "asc" | ||
}, | ||
"newlines-between": "always" | ||
} | ||
], | ||
"react/jsx-closing-bracket-location": [ | ||
"error", | ||
"after-props" | ||
], | ||
"react/jsx-first-prop-new-line": [ | ||
"error", | ||
"multiline" | ||
], | ||
"react/jsx-indent": [ | ||
"error", | ||
2 | ||
], | ||
"react/jsx-indent-props": [ | ||
"error", | ||
2 | ||
], | ||
"react/jsx-max-props-per-line": [ | ||
"error", | ||
{ | ||
"maximum": 1 | ||
} | ||
], | ||
"react/jsx-sort-props": [ | ||
"error", | ||
{ | ||
"callbacksLast": true, | ||
"multiline": "last", | ||
"reservedFirst": true | ||
} | ||
], | ||
"react/jsx-tag-spacing": [ | ||
"error", | ||
{ | ||
"beforeSelfClosing": "always" | ||
} | ||
], | ||
"react/no-unknown-property": [ | ||
"error", | ||
{ | ||
"ignore": [ | ||
"css" | ||
] | ||
} | ||
], | ||
"react/prop-types": "off" | ||
} | ||
} |
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,60 @@ | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: development | ||
steps: | ||
- name: Checkout repos | ||
uses: actions/checkout@v3 | ||
- name: Setup Node.js 16.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
- name: Rewrite .env | ||
shell: pwsh | ||
run: | | ||
$content = Get-Content -Path .env | ||
$content = $content -replace "{{APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}}", "${{secrets.APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}}" | ||
$content = $content -replace "{{MSAL_AUTHORITY}}", "${{secrets.MSAL_AUTHORITY}}" | ||
$content = $content -replace "{{MSAL_CLIENT_ID}}", "${{secrets.MSAL_CLIENT_ID}}" | ||
Out-File -FilePath .env -InputObject $content -Encoding UTF8 | ||
- name: Build source | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Upload build files | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hitofude | ||
path: dist | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: development | ||
steps: | ||
- name: Download build files | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: hitofude | ||
path: artifact | ||
- name: Connect to Azure | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{secrets.AZURE_CREDENTIALS}} | ||
- name: Upload to blob storage | ||
uses: azure/CLI@v1 | ||
with: | ||
inlineScript: | | ||
az storage blob delete-batch --account-name ${{secrets.AZURE_STORAGE_ACCOUNT_NAME}} --source '$web' | ||
az storage blob upload-batch --account-name ${{secrets.AZURE_STORAGE_ACCOUNT_NAME}} --auth-mode key --destination '$web' --source artifact | ||
- name: Purge CDN endpoint | ||
uses: azure/CLI@v1 | ||
with: | ||
inlineScript: | | ||
az cdn endpoint purge --content-paths '/*' --profile-name ${{secrets.AZURE_CDN_PROFILE_NAME}} --name ${{secrets.AZURE_CDN_ENDPOINT_NAME}} --resource-group ${{secrets.AZURE_RESOURCE_GROUP_NAME}} |
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,60 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: production | ||
steps: | ||
- name: Checkout repos | ||
uses: actions/checkout@v3 | ||
- name: Setup Node.js 16.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
- name: Rewrite .env | ||
shell: pwsh | ||
run: | | ||
$content = Get-Content -Path .env | ||
$content = $content -replace "{{APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}}", "${{secrets.APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}}" | ||
$content = $content -replace "{{MSAL_AUTHORITY}}", "${{secrets.MSAL_AUTHORITY}}" | ||
$content = $content -replace "{{MSAL_CLIENT_ID}}", "${{secrets.MSAL_CLIENT_ID}}" | ||
Out-File -FilePath .env -InputObject $content -Encoding UTF8 | ||
- name: Build source | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Upload build files | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hitofude | ||
path: dist | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: production | ||
steps: | ||
- name: Download build files | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: hitofude | ||
path: artifact | ||
- name: Connect to Azure | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{secrets.AZURE_CREDENTIALS}} | ||
- name: Upload to blob storage | ||
uses: azure/CLI@v1 | ||
with: | ||
inlineScript: | | ||
az storage blob delete-batch --account-name ${{secrets.AZURE_STORAGE_ACCOUNT_NAME}} --source '$web' | ||
az storage blob upload-batch --account-name ${{secrets.AZURE_STORAGE_ACCOUNT_NAME}} --auth-mode key --destination '$web' --source artifact | ||
- name: Purge CDN endpoint | ||
uses: azure/CLI@v1 | ||
with: | ||
inlineScript: | | ||
az cdn endpoint purge --content-paths '/*' --profile-name ${{secrets.AZURE_CDN_PROFILE_NAME}} --name ${{secrets.AZURE_CDN_ENDPOINT_NAME}} --resource-group ${{secrets.AZURE_RESOURCE_GROUP_NAME}} |
Oops, something went wrong.