From e76b0314d96403a9f0c955ca1e961825df27eb53 Mon Sep 17 00:00:00 2001 From: Shubhabrata Ghosh <35366351+Shubhabrata08@users.noreply.github.com> Date: Fri, 9 Feb 2024 16:34:55 +0530 Subject: [PATCH] Add azure deployment code to testCoverage.yml (#54) * Apply automatic changes * Apply automatic changes * Apply automatic changes * Apply automatic changes * Apply automatic changes * Add azure deploy code to test coverage schedule * Add needs condition * remove docs --------- Co-authored-by: Shubhabrata08 --- .github/workflows/testCoverage.yml | 48 ++++++++++++------------------ 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/.github/workflows/testCoverage.yml b/.github/workflows/testCoverage.yml index 4db80384a8..cc3f3a4646 100644 --- a/.github/workflows/testCoverage.yml +++ b/.github/workflows/testCoverage.yml @@ -231,36 +231,26 @@ jobs: repository: repo branch: test-coverage-artifacts - deploy: + build_and_deploy_job: needs: push_artifacts_to_repo - runs-on: "ubuntu-latest" + runs-on: ubuntu-latest + name: Build and Deploy Job steps: - - uses: actions/checkout@v4 - with: - ref: main - - uses: actions/setup-node@v3 + - uses: actions/checkout@v3 with: - node-version: 18 - cache: yarn - - name: List files in docs - run: cd docs && ls -a - - name: Install dependencies - run: cd apps/docsite && yarn install --frozen-lockfile - - name: Build website - run: cd apps/docsite && yarn build - - # Popular action to deploy to GitHub Pages: - # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 + submodules: true + lfs: false + ref: test-coverage-artifacts + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - # Build output to publish to the `gh-pages` branch: - publish_dir: ./apps/docsite/build - # The following lines assign commit authorship to the official - # GH-Actions bot for deploys to `gh-pages` branch: - # https://github.com/actions/checkout/issues/13#issuecomment-724415212 - # The GH actions bot is used by default if you didn't specify the two fields. - # You can swap them out with your own user credentials. - user_name: github-actions[bot] - user_email: 41898282+github-actions[bot]@users.noreply.github.com + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_ISLAND_067885010 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: "upload" + ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig + app_location: "/" # App source code path + api_location: "" # Api source code path - optional + output_location: "" # Built app content directory - optional + ###### End of Repository/Build Configurations ######