Skip to content

Commit

Permalink
Create dashboard-gh-pages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sarangan12 authored Dec 13, 2024
1 parent b1476de commit f826819
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/dashboard-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Deploy Spec Dashboard to github pages

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
branches:
- main

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: ./.github/actions/setup

- name: Install dependencies
run: pnpm install

- name: Install browsers
run: pnpm exec playwright install

- name: Build
run: pnpm --filter "@typespec/spec-dashboard..." run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./packages/spec-dashboard/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit f826819

Please sign in to comment.