Skip to content

Commit

Permalink
Merge pull request #3 from microsoft/master
Browse files Browse the repository at this point in the history
  • Loading branch information
alphashr authored Nov 7, 2021
2 parents 0308a3f + 9f8444c commit d6237c1
Show file tree
Hide file tree
Showing 27 changed files with 402 additions and 180 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/azure-static-web-apps-blue-coast-0df7a6610.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/azure-static-web-apps-purple-ocean-0b7ce3410.yml

This file was deleted.

63 changes: 54 additions & 9 deletions .github/workflows/cd-color-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- master

env:
AZURE_WEBAPP_ACTIVE_STAGE_NAME: color-west-app
AZURE_WEBAPP_PASSIVE_STAGE_NAME: color-east-app
AZURE_WEBAPP_BUILD_PATH: sites/fast-color-explorer
AZURE_WEBAPP_DIST_PATH: sites/fast-color-explorer/www
AZURE_WEBAPP_SLOT_NAME: stage
ARTIFACT_NAME: color-explorer-site

jobs:
build_deploy_linux:
build:
runs-on: ubuntu-latest

env:
AZURE_WEBAPP_ACTIVE_STAGE_NAME: color-west-app
AZURE_WEBAPP_PASSIVE_STAGE_NAME: color-east-app
AZURE_WEBAPP_BUILD_PATH: sites/fast-color-explorer
AZURE_WEBAPP_DIST_PATH: sites/fast-color-explorer/www
AZURE_WEBAPP_SLOT_NAME: stage

steps:
- name: Checkout Branch
uses: actions/checkout@master
Expand All @@ -35,6 +40,23 @@ jobs:
npm i
ls -lta
- uses: actions/upload-artifact@v2
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.AZURE_WEBAPP_DIST_PATH }}

deploy_to_staging:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
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 to Active Azure Region'
uses: azure/webapps-deploy@v2
with:
Expand All @@ -51,9 +73,32 @@ 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 Component Explorer
id: deploypr
uses: Azure/static-web-apps-deploy@v0.0.1-preview
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APP_COLOR_PR_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: 'upload'
app_location: ${{ env.AZURE_WEBAPP_DIST_PATH }}
output_location: ''
skip_app_build: true

notify:
runs-on: ubuntu-latest
needs: build_deploy_linux
needs: deploy_to_staging

steps:
- name: Notify on Discord
Expand Down
63 changes: 54 additions & 9 deletions .github/workflows/cd-explore-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- master

env:
AZURE_WEBAPP_ACTIVE_STAGE_NAME: explore-west-app
AZURE_WEBAPP_PASSIVE_STAGE_NAME: explore-east-app
AZURE_WEBAPP_BUILD_PATH: sites/fast-component-explorer
AZURE_WEBAPP_DIST_PATH: sites/fast-component-explorer/www
AZURE_WEBAPP_SLOT_NAME: stage
ARTIFACT_NAME: component-explorer-site

jobs:
build_deploy_linux:
build:
runs-on: ubuntu-latest

env:
AZURE_WEBAPP_ACTIVE_STAGE_NAME: explore-west-app
AZURE_WEBAPP_PASSIVE_STAGE_NAME: explore-east-app
AZURE_WEBAPP_BUILD_PATH: sites/fast-component-explorer
AZURE_WEBAPP_DIST_PATH: sites/fast-component-explorer/www
AZURE_WEBAPP_SLOT_NAME: stage

steps:
- name: Checkout Branch
uses: actions/checkout@master
Expand All @@ -35,6 +40,23 @@ jobs:
npm i
ls -lta
- uses: actions/upload-artifact@v2
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.AZURE_WEBAPP_DIST_PATH }}

deploy_to_staging:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
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 to Active Azure Region'
uses: azure/webapps-deploy@v2
with:
Expand All @@ -51,9 +73,32 @@ 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 Component Explorer
id: deploypr
uses: Azure/static-web-apps-deploy@v0.0.1-preview
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APP_EXPLORE_PR_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: 'upload'
app_location: ${{ env.AZURE_WEBAPP_DIST_PATH }}
output_location: ''
skip_app_build: true

notify:
runs-on: ubuntu-latest
needs: build_deploy_linux
needs: deploy_to_staging

steps:
- name: Notify on Discord
Expand Down
77 changes: 67 additions & 10 deletions .github/workflows/cd-www-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,24 @@ name: Deploy Documentation
on:
push:
branches:
- master
- master
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- master

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/build
AZURE_WEBAPP_SLOT_NAME: stage
ARTIFACT_NAME: documentation-site

jobs:
build_deploy_linux:
build:
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/build
AZURE_WEBAPP_SLOT_NAME: stage

steps:
- name: Checkout Branch
uses: actions/checkout@master
Expand All @@ -35,6 +40,23 @@ jobs:
npm i
ls -lta
- uses: actions/upload-artifact@v2
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.AZURE_WEBAPP_DIST_PATH }}

deploy_to_staging:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
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 to Active Azure Region'
uses: azure/webapps-deploy@v2
with:
Expand All @@ -51,9 +73,44 @@ 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
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: Destroy PR
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APP_WWW_PR_TOKEN }}
action: 'close'

notify:
runs-on: ubuntu-latest
needs: build_deploy_linux
needs: deploy_to_staging

steps:
- name: Notify on Discord
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@

[![Maintainability](https://api.codeclimate.com/v1/badges/8a74621e634a6e9b9561/maintainability)](https://codeclimate.com/github/Microsoft/fast/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/8a74621e634a6e9b9561/test_coverage)](https://codeclimate.com/github/Microsoft/fast/test_coverage)
![workflows](https://github.com/microsoft/fast/workflows/CI%20-%20FAST/badge.svg?branch=master&event=push)
[![Validate PRs](https://github.com/microsoft/fast/actions/workflows/ci-daily.yml/badge.svg)](https://github.com/microsoft/fast/actions/workflows/ci-daily.yml)
[![Validate Cross Platform](https://github.com/microsoft/fast/actions/workflows/ci-daily.yml/badge.svg)](https://github.com/microsoft/fast/actions/workflows/ci-daily.yml)

[![Deploy Documentation](https://github.com/microsoft/fast/actions/workflows/cd-www-stage.yml/badge.svg)](https://github.com/microsoft/fast/actions/workflows/cd-www-stage.yml)
[![Deploy Component Explorer](https://github.com/microsoft/fast/actions/workflows/cd-explore-stage.yml/badge.svg)](https://github.com/microsoft/fast/actions/workflows/cd-explore-stage.yml)
[![Deploy Color Explorer](https://github.com/microsoft/fast/actions/workflows/cd-color-stage.yml/badge.svg)](https://github.com/microsoft/fast/actions/workflows/cd-color-stage.yml)
[![Deploy CDN](https://github.com/microsoft/fast/actions/workflows/cd-static-cdn.yml/badge.svg)](https://github.com/microsoft/fast/actions/workflows/cd-static-cdn.yml)

[![Discord](https://img.shields.io/badge/chat%20on-discord-7289da.svg)](https://discord.gg/FcSNfg4)
[![Twitter](https://img.shields.io/twitter/follow/fast_ui.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=fast_ui)
Expand Down
Loading

0 comments on commit d6237c1

Please sign in to comment.