-
Notifications
You must be signed in to change notification settings - Fork 1
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 #174 from data-to-insight/build/cross-repo-deploy
Build/cross repo deploy
- Loading branch information
Showing
4 changed files
with
118 additions
and
5 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 |
---|---|---|
|
@@ -26,6 +26,7 @@ jobs: | |
run: | | ||
yarn install --frozen-lockfile | ||
yarn build:dev | ||
node scripts/productionise-html.js --wheelPath /bin/dist/csc_validator_be_cin-0.1.3-py3-none-any.whl --tool ToolCIN | ||
- name: Deploy 🚀 | ||
if: github.ref == 'refs/heads/dev' | ||
|
@@ -35,12 +36,15 @@ jobs: | |
folder: build # The folder the action should deploy. | ||
target-folder: dev | ||
|
||
- name: Modify for 903 | ||
run: node scripts/productionise-html.js --wheelPath /bin/dist/csc_validator_be_903-0.1.0-py3-none-any.whl --tool Tool903 | ||
|
||
- name: Pushes files to 903/LAC repo | ||
uses: dmnemec/copy_file_to_another_repo_action@main | ||
env: | ||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | ||
with: | ||
source_file: 'build/*' | ||
source_file: 'build/.' | ||
destination_repo: 'data-to-insight/csc-validator-fe-publish-903' | ||
destination_branch: 'gh-pages' | ||
user_email: '[email protected]' | ||
|
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
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,33 @@ | ||
const { parse } = require('node-html-parser'); | ||
const args = require('args'); | ||
const fs = require('fs'); | ||
const { exit } = require('process'); | ||
|
||
const filePath = './build/index.html'; | ||
|
||
const raw = fs.readFileSync(filePath); | ||
|
||
args | ||
.option('wheelPath', 'the path to the wheel file') | ||
.option('tool', 'the tool name'); | ||
|
||
const flags = args.parse(process.argv); | ||
|
||
if (!flags.tool || !flags.wheelPath) { | ||
throw new Error('missing arguments'); | ||
} | ||
|
||
const { wheelPath, tool } = flags; | ||
|
||
const body = parse(raw); | ||
|
||
const element = body.querySelector('#root'); | ||
|
||
element.setAttribute('data-wheelPath', wheelPath); | ||
element.setAttribute('data-tool', tool); | ||
|
||
const output = body.toString(); | ||
|
||
fs.writeFileSync(filePath, output); | ||
|
||
exit(0); |
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 |
---|---|---|
|
@@ -3340,6 +3340,16 @@ argparse@^2.0.1: | |
resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" | ||
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== | ||
|
||
args@^5.0.3: | ||
version "5.0.3" | ||
resolved "https://registry.yarnpkg.com/args/-/args-5.0.3.tgz#943256db85021a85684be2f0882f25d796278702" | ||
integrity sha512-h6k/zfFgusnv3i5TU08KQkVKuCPBtL/PWQbWkHUxvJrZ2nAyeaUupneemcrgn1xmqxPQsPIzwkUhOpoqPDRZuA== | ||
dependencies: | ||
camelcase "5.0.0" | ||
chalk "2.4.2" | ||
leven "2.1.0" | ||
mri "1.1.4" | ||
|
||
aria-query@^4.2.2: | ||
version "4.2.2" | ||
resolved "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz" | ||
|
@@ -3844,6 +3854,11 @@ camelcase-css@^2.0.1: | |
resolved "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz" | ||
integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== | ||
|
||
[email protected]: | ||
version "5.0.0" | ||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" | ||
integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA== | ||
|
||
camelcase@^5.3.1: | ||
version "5.3.1" | ||
resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" | ||
|
@@ -3879,7 +3894,7 @@ case-sensitive-paths-webpack-plugin@^2.4.0: | |
resolved "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz" | ||
integrity sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw== | ||
|
||
chalk@^2.0.0, chalk@^2.4.1: | ||
chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1: | ||
version "2.4.2" | ||
resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" | ||
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== | ||
|
@@ -4339,6 +4354,17 @@ css-select@^4.1.3: | |
domutils "^2.8.0" | ||
nth-check "^2.0.1" | ||
|
||
css-select@^5.1.0: | ||
version "5.1.0" | ||
resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" | ||
integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== | ||
dependencies: | ||
boolbase "^1.0.0" | ||
css-what "^6.1.0" | ||
domhandler "^5.0.2" | ||
domutils "^3.0.1" | ||
nth-check "^2.0.1" | ||
|
||
[email protected]: | ||
version "1.0.0-alpha.37" | ||
resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz" | ||
|
@@ -4360,7 +4386,7 @@ css-what@^3.2.1: | |
resolved "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz" | ||
integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== | ||
|
||
css-what@^6.0.1: | ||
css-what@^6.0.1, css-what@^6.1.0: | ||
version "6.1.0" | ||
resolved "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz" | ||
integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== | ||
|
@@ -4730,12 +4756,21 @@ dom-serializer@^1.0.1: | |
domhandler "^4.2.0" | ||
entities "^2.0.0" | ||
|
||
dom-serializer@^2.0.0: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" | ||
integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== | ||
dependencies: | ||
domelementtype "^2.3.0" | ||
domhandler "^5.0.2" | ||
entities "^4.2.0" | ||
|
||
domelementtype@1: | ||
version "1.3.1" | ||
resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz" | ||
integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== | ||
|
||
domelementtype@^2.0.1, domelementtype@^2.2.0: | ||
domelementtype@^2.0.1, domelementtype@^2.2.0, domelementtype@^2.3.0: | ||
version "2.3.0" | ||
resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz" | ||
integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== | ||
|
@@ -4754,6 +4789,13 @@ domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: | |
dependencies: | ||
domelementtype "^2.2.0" | ||
|
||
domhandler@^5.0.2, domhandler@^5.0.3: | ||
version "5.0.3" | ||
resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" | ||
integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== | ||
dependencies: | ||
domelementtype "^2.3.0" | ||
|
||
domutils@^1.7.0: | ||
version "1.7.0" | ||
resolved "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz" | ||
|
@@ -4771,6 +4813,15 @@ domutils@^2.5.2, domutils@^2.8.0: | |
domelementtype "^2.2.0" | ||
domhandler "^4.2.0" | ||
|
||
domutils@^3.0.1: | ||
version "3.1.0" | ||
resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" | ||
integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== | ||
dependencies: | ||
dom-serializer "^2.0.0" | ||
domelementtype "^2.3.0" | ||
domhandler "^5.0.3" | ||
|
||
dot-case@^3.0.4: | ||
version "3.0.4" | ||
resolved "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz" | ||
|
@@ -4859,6 +4910,11 @@ entities@^2.0.0: | |
resolved "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz" | ||
integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== | ||
|
||
entities@^4.2.0: | ||
version "4.5.0" | ||
resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" | ||
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== | ||
|
||
error-ex@^1.3.1: | ||
version "1.3.2" | ||
resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" | ||
|
@@ -5872,7 +5928,7 @@ has@^1.0.3: | |
dependencies: | ||
function-bind "^1.1.1" | ||
|
||
he@^1.2.0: | ||
he@1.2.0, he@^1.2.0: | ||
version "1.2.0" | ||
resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" | ||
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== | ||
|
@@ -7169,6 +7225,11 @@ language-tags@^1.0.5: | |
dependencies: | ||
language-subtag-registry "~0.3.2" | ||
|
||
[email protected]: | ||
version "2.1.0" | ||
resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" | ||
integrity sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA== | ||
|
||
leven@^3.1.0: | ||
version "3.1.0" | ||
resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" | ||
|
@@ -7480,6 +7541,11 @@ moment@^2.29.4: | |
resolved "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz" | ||
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== | ||
|
||
[email protected]: | ||
version "1.1.4" | ||
resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.4.tgz#7cb1dd1b9b40905f1fac053abe25b6720f44744a" | ||
integrity sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w== | ||
|
||
[email protected]: | ||
version "2.0.0" | ||
resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" | ||
|
@@ -7548,6 +7614,14 @@ node-forge@^1: | |
resolved "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz" | ||
integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== | ||
|
||
node-html-parser@^6.1.10: | ||
version "6.1.10" | ||
resolved "https://registry.yarnpkg.com/node-html-parser/-/node-html-parser-6.1.10.tgz#5db11eac3ccbea6fc1b04a22c8a0e3a0774cfae6" | ||
integrity sha512-6/uWdWxjQWQ7tMcFK2wWlrflsQUzh1HsEzlIf2j5+TtzfhT2yUvg3DwZYAmjEHeR3uX74ko7exjHW69J0tOzIg== | ||
dependencies: | ||
css-select "^5.1.0" | ||
he "1.2.0" | ||
|
||
node-int64@^0.4.0: | ||
version "0.4.0" | ||
resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" | ||
|