Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken links and site nav glitch, misc cleanup #141

Merged
merged 13 commits into from
Feb 16, 2024
Merged
171 changes: 100 additions & 71 deletions .github/workflows/build-and-stage.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,100 @@
name: Build and stage

env:
AZURE_WEBAPP_PACKAGE_PATH: '.'
DOTNET_VERSION: '8.0'
SLOT_NAME: staging

on:
push:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
name: Build and publish app
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Set up dependency caching for faster builds
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Build with dotnet
run: dotnet build src/Client --configuration Release
- name: dotnet publish
run: dotnet publish src/Client -c Release -o ${{ env.DOTNET_ROOT }}/mainsite
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: Steeltoe-MainSite
path: ${{ env.DOTNET_ROOT }}/mainsite

deploy-to-staging:
name: Deploy to staging environment
permissions:
contents: none
runs-on: ubuntu-latest
needs: build
environment:
name: 'Staging'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: Steeltoe-MainSite

- name: Log into Azure CLI with service principal
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: ${{ vars.AZURE_WEBAPP_NAME }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
slot-name: ${{ env.SLOT_NAME }}
name: Build and stage

env:
AZURE_WEBAPP_PACKAGE_PATH: '.'
DOTNET_VERSION: '8.0'

on:
push:
branches: [ "main" ]
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: 'write'

jobs:
build:
name: Build and publish app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Set up dependency caching for faster builds
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: dotnet build
run: dotnet build src/Client --configuration Release

- name: dotnet publish
run: dotnet publish src/Client -c Release -o ${{ env.DOTNET_ROOT }}/mainsite

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: Steeltoe-MainSite
path: ${{ env.DOTNET_ROOT }}/mainsite

deploy-to-staging:
name: Deploy to staging environment
runs-on: ubuntu-latest
needs: build
environment:
name: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || vars.STAGING_SLOT_NAME }}
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
env:
SLOT_NAME: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || vars.STAGING_SLOT_NAME }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: Steeltoe-MainSite

- name: Log into Azure CLI with service principal
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: If PR, create a new staging slot
if: ${{ github.event_name == 'pull_request' }}
run: az webapp deployment slot create --resource-group ${{ vars.AZURE_RESOURCE_GROUP }} --name ${{ vars.AZURE_WEBAPP_NAME}} --slot ${{ env.SLOT_NAME }}
# Need to pair a PR slot with a custom docs site address?
# az webapp config appsettings set -g steeltoe --name www-steeltoe --slot pr-141 --settings DocsSite__BaseAddress=https://docs-steeltoe-pr-310.azurewebsites.net

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: ${{ vars.AZURE_WEBAPP_NAME }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
slot-name: ${{ env.SLOT_NAME }}

- name: If PR, comment with the preview link
if: ${{ github.event_name == 'pull_request' }}
uses: mshick/add-pr-comment@v2
with:
message: |
## Preview link: https://${{ vars.AZURE_WEBAPP_NAME }}-${{ env.SLOT_NAME }}.azurewebsites.net

- Your changes have been deployed to the preview site. The preview site will update as you add more commits to this branch.
- The preview link is shareable, but will be deleted when the pull request is merged or closed.

> *This is an automated message.*
repo-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/pr-cleanup.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Delete a preview environment

on:
Expand Down
98 changes: 0 additions & 98 deletions .github/workflows/pr-deploy.yml

This file was deleted.

17 changes: 4 additions & 13 deletions src/Client/Components/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<!-- OneTrust Cookie Consent -->
<meta content="3ab34b71-7023-4e93-90e8-12dd544a5179" name="onetrust-data-domain">
<meta content="https://tags.tiqcdn.com/utag/vmware/microsites-privacy/prod/utag.js" name="microsites-utag">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="//www.vmware.com/files/templates/inc/utag_data.js"></script>
<script src="//tags.tiqcdn.com/utag/vmware/microsites-privacy/prod/utag.sync.js"></script>
<script>function OptanonWrapper() { { window.dataLayer.push({ event: 'OneTrustGroupsUpdated' }); } }</script>
Expand Down Expand Up @@ -41,14 +41,13 @@
<meta content="2019-10-03" name="DC.Date" scheme="ISO8601">
<meta content="text/html" name="DC.Type">
<meta content="https://steeltoe.io/" name="DC.Identifier">
<meta content="Copyright © 2005-2023 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries." name="DC.Rights">
<meta content="Copyright © 2005-@(DateTime.Now.Year) Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries." name="DC.Rights">

<base href="/" />
<title>Steeltoe OSS</title>
<link rel="canonical" href="https://steeltoe.io/">
<link rel="icon" href="https://steeltoe.io/images/favicon.png" type="image/png" />
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/a11y-dark.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<link rel="stylesheet" href="css/fonts.css" />
<link rel="stylesheet" href="css/site.css" />
<link rel="stylesheet" href="css/mobile.css" />
Expand All @@ -70,14 +69,6 @@
<Routes />
<script src="js/functions.js" type="text/javascript"></script>
<script src="_framework/blazor.web.js"></script>
<script src="js/highlightjs-badge.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/languages/powershell.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/languages/csharp.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/languages/bash.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/languages/json.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/languages/xml.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/languages/yaml.min.js" type="text/javascript"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
</body>
</html>
45 changes: 0 additions & 45 deletions src/Client/Components/AppSettingsTab/Azure.razor

This file was deleted.

Loading
Loading