From 0a68faf1b6ce80ced3f09d777492bac5c401233c Mon Sep 17 00:00:00 2001 From: Aaron Wentzel <16669785+awentzel@users.noreply.github.com> Date: Tue, 16 Jun 2020 12:42:21 -0700 Subject: [PATCH 1/2] add initial plumbing for www staging deployment --- .github/workflows/cd-www-stage.yml | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/cd-www-stage.yml diff --git a/.github/workflows/cd-www-stage.yml b/.github/workflows/cd-www-stage.yml new file mode 100644 index 00000000000..8aa6a5d35af --- /dev/null +++ b/.github/workflows/cd-www-stage.yml @@ -0,0 +1,51 @@ +name: CD - FAST +on: + push: + branches: + - master + +jobs: + build_deploy_linux: + runs-on: ubuntu-latest + + env: + AZURE_WEBAPP_ACTIVE_STAGE_NAME: www-west-app + AZURE_WEBAPP_PASSIVE_STAGE_NAME: www-east-app + AZURE_WEBAPP_BUILD_PATH: sites/website + AZURE_WEBAPP_DIST_PATH: sites/website/www + AZURE_WEBAPP_SLOT_NAME: stage + + steps: + - name: Checkout Branch + uses: actions/checkout@master + + - name: Install Lerna + run: yarn global add lerna + + - name: Install package dependencies / prepare workspaces + run: yarn install --frozen-lockfile + + - name: Build & Prepare Web Application + run: | + cd ${{ env.AZURE_WEBAPP_BUILD_PATH }} + yarn build + cp ../site-utilities/statics/server/package.json ../site-utilities/statics/server/server.js www + cd www + npm i + ls -lta + + - name: 'Deploy to Active Azure Region' + uses: azure/webapps-deploy@v2 + with: + publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE_WWW_ACTIVE }} + app-name: ${{ env.AZURE_WEBAPP_ACTIVE_STAGE_NAME }} + package: ${{ env.AZURE_WEBAPP_DIST_PATH }} + slot-name: ${{ env.AZURE_WEBAPP_SLOT_NAME }} + + - name: 'Deploy to Passive Azure Region' + uses: azure/webapps-deploy@v2 + with: + publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE_WWW_PASSIVE }} + app-name: ${{ env.AZURE_WEBAPP_PASSIVE_STAGE_NAME }} + package: ${{ env.AZURE_WEBAPP_DIST_PATH }} + slot-name: ${{ env.AZURE_WEBAPP_SLOT_NAME }} \ No newline at end of file From 1ba147aa5f6c3adad0d5ff5d0e41dc709e74dd61 Mon Sep 17 00:00:00 2001 From: Aaron Wentzel <16669785+awentzel@users.noreply.github.com> Date: Tue, 16 Jun 2020 13:06:01 -0700 Subject: [PATCH 2/2] updates to match source code routines --- .github/workflows/cd-www-stage.yml | 3 ++- yarn.lock | 15 ++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cd-www-stage.yml b/.github/workflows/cd-www-stage.yml index 8aa6a5d35af..b9590320259 100644 --- a/.github/workflows/cd-www-stage.yml +++ b/.github/workflows/cd-www-stage.yml @@ -28,9 +28,10 @@ jobs: - name: Build & Prepare Web Application run: | cd ${{ env.AZURE_WEBAPP_BUILD_PATH }} + npm i yarn build cp ../site-utilities/statics/server/package.json ../site-utilities/statics/server/server.js www - cd www + cd static npm i ls -lta diff --git a/yarn.lock b/yarn.lock index 698a94196a0..d5482070501 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4181,6 +4181,11 @@ source-map "~0.6.1" typescript "~3.7.2" +"@microsoft/fast-element@^0.10.2": + version "0.10.2" + resolved "https://registry.yarnpkg.com/@microsoft/fast-element/-/fast-element-0.10.2.tgz#8d38c09c7d54fd017bb0b2e7a26755f3a414753f" + integrity sha512-VdnjhaG/nJ3JRgwEo22exyV83HAI8H3Gz5ZmCriMiQb9hENWVwtLsTeakRLBKDg433KFOwaGcYFsHZtpuNcNWw== + "@microsoft/tsdoc-config@^0.13.4": version "0.13.4" resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.13.4.tgz#84ad92b88d3899683376224de91567b01d447d18" @@ -5614,7 +5619,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^16.3.0", "@types/react@^16.4.18", "@types/react@^16.7.17", "@types/react@^16.8.0", "@types/react@^16.8.19": +"@types/react@*", "@types/react@^16.3.0", "@types/react@^16.4.18", "@types/react@^16.7.17", "@types/react@^16.8.0", "@types/react@^16.8.19", "@types/react@^16.9.17": version "16.9.11" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.11.tgz#70e0b7ad79058a7842f25ccf2999807076ada120" integrity sha512-UBT4GZ3PokTXSWmdgC/GeCGEJXE5ofWyibCcecRLUVN2ZBpXQGVgQGtG2foS7CrTKFKlQVVswLvf7Js6XA/CVQ== @@ -5622,14 +5627,6 @@ "@types/prop-types" "*" csstype "^2.2.0" -"@types/react@^16.9.17": - version "16.9.36" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.36.tgz#ade589ff51e2a903e34ee4669e05dbfa0c1ce849" - integrity sha512-mGgUb/Rk/vGx4NCvquRuSH0GHBQKb1OqpGS9cT9lFxlTLHZgkksgI60TuIxubmn7JuCb+sENHhQciqa0npm0AQ== - dependencies: - "@types/prop-types" "*" - csstype "^2.2.0" - "@types/resolve@0.0.8": version "0.0.8" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194"