Skip to content

chore(deps-dev): bump the vuepress group with 4 updates #70

chore(deps-dev): bump the vuepress group with 4 updates

chore(deps-dev): bump the vuepress group with 4 updates #70

Workflow file for this run

name: Publish Website
on:
push:
branches: [ main ]
pull_request:
types: [ opened, synchronize, reopened, closed ]
branches: [ main ]
env:
STAGING_DEPLOYMENT_CLIENT_ID: 9585b6c7-20f9-4756-9e8c-4b34585ac8ca
STAGING_STORAGE_CONTAINER: "$web"
STAGING_STORAGE_ACCOUNT: "blogsierrasoftworksbeta"
STAGING_CDN_RESOURCEGROUP: app-blog
STAGING_CDN_PROFILE: "blog-sierrasoftworks"
STAGING_CDN_ENDPOINT: "blog-sierrasoftworks-staging"
LIVE_DEPLOYMENT_CLIENT_ID: 63951991-4dc9-4524-92cb-53b73016393c
LIVE_STORAGE_CONTAINER: "$web"
LIVE_STORAGE_ACCOUNT: "blogsierrasoftworks"
LIVE_CDN_RESOURCEGROUP: app-blog
LIVE_CDN_PROFILE: "blog-sierrasoftworks"
LIVE_CDN_ENDPOINT: "blog-sierrasoftworks-live"
permissions:
id-token: write
pages: write
jobs:
build:
name: Build (Docs)
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Restore Packages
run: npm ci
- name: Build Website
run: npm run build --if-present
- name: Upload Artifact for Website
uses: actions/upload-artifact@v4
with:
name: site
path: ./dist
deploy-webapps:
name: Deploy (Azure Static Web Apps)
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: site
path: dist
- name: Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
app_location: "/dist"
api_location: ""
skip_app_build: true
deploy-staging:
name: Deploy Staging (Azure CDN)
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
needs: [build]
environment:
name: Staging
url: https://blog-staging.sierrasoftworks.com
steps:
- name: Download Artifacts for Website
uses: actions/download-artifact@v4
with:
name: site
path: ./dist
- name: Login to Azure
uses: azure/login@v2
with:
subscription-id: "108b3ddb-53fb-4344-80b2-d6c151912be6"
tenant-id: "a26571f1-22b3-4756-ac7b-39ca684fab48"
client-id: ${{ env.STAGING_DEPLOYMENT_CLIENT_ID }}
- name: Copy Artifacts to Storage
uses: azure/CLI@v2
with:
inlineScript: |
echo "Uploading Site Contents"
az storage blob sync --container '${{ env.STAGING_STORAGE_CONTAINER }}' --account-name ${{ env.STAGING_STORAGE_ACCOUNT }} --source ./dist
- name: Purge Azure CDN
uses: azure/CLI@v2
with:
inlineScript: |
echo "Purging CDN"
az cdn endpoint purge -g ${{ env.STAGING_CDN_RESOURCEGROUP }} -n ${{ env.STAGING_CDN_ENDPOINT }} --profile-name ${{ env.STAGING_CDN_PROFILE }} --content-paths '/*'
deploy-gh-pages:
name: Deploy Production (GitHub Pages)
runs-on: ubuntu-latest
needs: [build, deploy-staging]
if: github.event_name == 'push'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup GitHub Pages
uses: actions/configure-pages@v5
- name: Download Artifacts for Website
uses: actions/download-artifact@v4
with:
name: site
path: ./dist
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
deploy-live:
name: Deploy Production (Azure CDN)
runs-on: ubuntu-latest
needs: [build, deploy-staging]
if: github.event_name == 'push'
environment:
name: Production
url: https://blog.sierrasoftworks.com
steps:
- name: Download Artifacts for Website
uses: actions/download-artifact@v4
with:
name: site
path: ./dist
- name: Login to Azure
uses: azure/login@v2
with:
subscription-id: "108b3ddb-53fb-4344-80b2-d6c151912be6"
tenant-id: "a26571f1-22b3-4756-ac7b-39ca684fab48"
client-id: ${{ env.LIVE_DEPLOYMENT_CLIENT_ID }}
- name: Copy Artifacts to Storage
uses: azure/CLI@v2
with:
inlineScript: |
echo "Uploading Site Contents"
az storage blob sync --container '${{ env.LIVE_STORAGE_CONTAINER }}' --account-name ${{ env.LIVE_STORAGE_ACCOUNT }} --source ./dist
- name: Purge Azure CDN
uses: azure/CLI@v2
with:
inlineScript: |
echo "Purging CDN"
az cdn endpoint purge -g ${{ env.LIVE_CDN_RESOURCEGROUP }} -n ${{ env.LIVE_CDN_ENDPOINT }} --profile-name ${{ env.LIVE_CDN_PROFILE }} --content-paths '/*'
cleanup:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
action: "close"