From c608ccb86488f85e2ef2fd834f41c07acc387d68 Mon Sep 17 00:00:00 2001 From: Chris Holt Date: Fri, 23 Feb 2024 10:09:10 -0800 Subject: [PATCH 1/3] use azure login action as replacement for basic auth --- .github/workflows/cd-deploy-color-staging.yml | 5 ++ .../workflows/cd-deploy-www-production.yml | 5 ++ .github/workflows/cd-deploy-www-staging.yml | 83 +++++++++++++------ 3 files changed, 67 insertions(+), 26 deletions(-) diff --git a/.github/workflows/cd-deploy-color-staging.yml b/.github/workflows/cd-deploy-color-staging.yml index 56db50e7e84..7a05bb7b3e8 100644 --- a/.github/workflows/cd-deploy-color-staging.yml +++ b/.github/workflows/cd-deploy-color-staging.yml @@ -57,6 +57,11 @@ jobs: needs: build steps: + - name: 'Azure Login' + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS_FAST_DESIGN }} + - name: Deploy PR uses: actions/download-artifact@v2 with: diff --git a/.github/workflows/cd-deploy-www-production.yml b/.github/workflows/cd-deploy-www-production.yml index 2b37167ae34..d75ee0305f3 100644 --- a/.github/workflows/cd-deploy-www-production.yml +++ b/.github/workflows/cd-deploy-www-production.yml @@ -44,6 +44,11 @@ jobs: needs: build steps: + - name: 'Azure Login' + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS_FAST_DESIGN }} + - uses: actions/download-artifact@v2 with: name: ${{ env.ARTIFACT_NAME }} diff --git a/.github/workflows/cd-deploy-www-staging.yml b/.github/workflows/cd-deploy-www-staging.yml index 5bed5b6b372..975340509cb 100644 --- a/.github/workflows/cd-deploy-www-staging.yml +++ b/.github/workflows/cd-deploy-www-staging.yml @@ -13,7 +13,7 @@ on: pull_request: types: [opened, synchronize, reopened, closed] branches: - - master + - archives/fast-element-1 paths: - '.github/workflows/cd-deploy-www-staging.yml' - 'packages/utilities/fast-color/docs/api-report.md' @@ -38,6 +38,10 @@ jobs: - name: Checkout Branch uses: actions/checkout@master + - uses: actions/setup-node@v3 + with: + node-version: 16.20.0 + - name: Install Lerna run: yarn global add lerna@5.5.2 @@ -59,8 +63,8 @@ jobs: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.AZURE_WEBAPP_DIST_PATH }} - deploy_to_staging: - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + deploy_pr_to_staging: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest needs: build @@ -71,6 +75,17 @@ jobs: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.AZURE_WEBAPP_DIST_PATH }} + deploy_active_region: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + runs-on: ubuntu-latest + needs: build + + steps: + - name: 'Azure Login' + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS_ACTIVE }} + - name: 'Deploy to Active Azure Region' uses: azure/webapps-deploy@v2 with: @@ -79,6 +94,17 @@ jobs: package: ${{ env.AZURE_WEBAPP_DIST_PATH }} slot-name: ${{ env.AZURE_WEBAPP_SLOT_NAME }} + deploy_passive_region: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + runs-on: ubuntu-latest + needs: build + + steps: + - name: 'Azure Login' + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS_PASSIVE }} + - name: 'Deploy to Passive Azure Region' uses: azure/webapps-deploy@v2 with: @@ -87,35 +113,40 @@ jobs: package: ${{ env.AZURE_WEBAPP_DIST_PATH }} slot-name: ${{ env.AZURE_WEBAPP_SLOT_NAME }} - deploy_pr: - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') - runs-on: ubuntu-latest - needs: build - - steps: - - name: Deploy PR - uses: actions/download-artifact@v2 - with: - name: ${{ env.ARTIFACT_NAME }} - path: ${{ env.AZURE_WEBAPP_DIST_PATH }} - - - name: Deploy Documentation - id: deploypr - uses: Azure/static-web-apps-deploy@v0.0.1-preview - continue-on-error: ${{ (github.event_name == 'pull_request' && github.event.action != 'closed') }} - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APP_WWW_PR_TOKEN }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: 'upload' - app_location: ${{ env.AZURE_WEBAPP_DIST_PATH }} - output_location: '' - skip_app_build: true + # deploy_pr: + # if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + # runs-on: ubuntu-latest + # needs: build + + # steps: + # - name: Deploy PR + # uses: actions/download-artifact@v2 + # with: + # name: ${{ env.ARTIFACT_NAME }} + # path: ${{ env.AZURE_WEBAPP_DIST_PATH }} + + # - name: Deploy Documentation + # id: deploypr + # uses: Azure/static-web-apps-deploy@v0.0.1-preview + # continue-on-error: ${{ (github.event_name == 'pull_request' && github.event.action != 'closed') }} + # with: + # azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APP_WWW_PR_TOKEN }} + # repo_token: ${{ secrets.GITHUB_TOKEN }} + # action: 'upload' + # app_location: ${{ env.AZURE_WEBAPP_DIST_PATH }} + # output_location: '' + # skip_app_build: true destroy_pr: if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest steps: + - name: 'Azure Login' + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS_FAST_DESIGN }} + - name: Destroy PR id: closepullrequest uses: Azure/static-web-apps-deploy@v1 From a2f3d5a0bfac747f8d6871883603ecc13c831349 Mon Sep 17 00:00:00 2001 From: Chris Holt Date: Fri, 23 Feb 2024 14:05:56 -0800 Subject: [PATCH 2/3] update notify and remove components for test --- .github/workflows/cd-deploy-www-staging.yml | 28 ++++++++++----------- sites/fast-website/src/public/header.ejs | 1 - sites/website/src/css/custom.css | 4 +++ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cd-deploy-www-staging.yml b/.github/workflows/cd-deploy-www-staging.yml index 975340509cb..2766c21684f 100644 --- a/.github/workflows/cd-deploy-www-staging.yml +++ b/.github/workflows/cd-deploy-www-staging.yml @@ -63,18 +63,6 @@ jobs: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.AZURE_WEBAPP_DIST_PATH }} - deploy_pr_to_staging: - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') - runs-on: ubuntu-latest - needs: build - - steps: - - name: Deploy PR - uses: actions/download-artifact@v2 - with: - name: ${{ env.ARTIFACT_NAME }} - path: ${{ env.AZURE_WEBAPP_DIST_PATH }} - deploy_active_region: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest @@ -86,10 +74,15 @@ jobs: with: creds: ${{ secrets.AZURE_CREDENTIALS_ACTIVE }} + - name: Download Artifact + uses: actions/download-artifact@v2 + with: + name: ${{ env.ARTIFACT_NAME }} + path: ${{ env.AZURE_WEBAPP_DIST_PATH }} + - 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 }} @@ -105,10 +98,15 @@ jobs: with: creds: ${{ secrets.AZURE_CREDENTIALS_PASSIVE }} + - name: Download Artifact + uses: actions/download-artifact@v2 + with: + name: ${{ env.ARTIFACT_NAME }} + path: ${{ env.AZURE_WEBAPP_DIST_PATH }} + - 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 }} @@ -156,7 +154,7 @@ jobs: notify: runs-on: ubuntu-latest - needs: deploy_to_staging + needs: [deploy_active_region, deploy_passive_region] steps: - name: Notify on Discord diff --git a/sites/fast-website/src/public/header.ejs b/sites/fast-website/src/public/header.ejs index 860367be6c0..cf40382fd14 100644 --- a/sites/fast-website/src/public/header.ejs +++ b/sites/fast-website/src/public/header.ejs @@ -11,7 +11,6 @@ <%= require("svg/icon-brand.svg") %> <%= require("svg/icon-brand-fast.svg") %> - Components Documentation Community Date: Mon, 29 Apr 2024 10:33:28 -0700 Subject: [PATCH 3/3] another high contrast fix for the docs site --- sites/website/src/css/custom.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sites/website/src/css/custom.css b/sites/website/src/css/custom.css index 6d9edc6a335..4bb40c372bf 100644 --- a/sites/website/src/css/custom.css +++ b/sites/website/src/css/custom.css @@ -74,8 +74,9 @@ html[data-theme='dark'] .DocSearch-Hit[aria-selected="true"] a mark { --ifm-menu-color-background-active: transparent; } +.breadcrumbs__link, .menu__list-item-collapsible--active { - background: transparent; + background: transparent !important; } .docusaurus-highlight-code-line { @@ -95,3 +96,7 @@ html[data-theme='dark'] .DocSearch-Hit[aria-selected="true"] a mark { background: var(--ifm-color-primary); color: var(--ifm-color-secondary); } + +.navbar__item.navbar__link.navbar__link--active { + color: var(--ifm-heading-color); +}