microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/fix-6465

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/website-gh-pages.yml

55lines · modecode

1name: Deploy TypeSpec Website to github pages
2
3on:
4 # Allows you to run this workflow manually from the Actions tab
5 workflow_dispatch:
6 push:
7 branches:
8 - main
9
10# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11permissions:
12 contents: read
13 pages: write
14 id-token: write
15
16# Allow one concurrent deployment
17concurrency:
18 group: "pages"
19 cancel-in-progress: true
20
21jobs:
22 # Build job
23 build:
24 runs-on: ubuntu-latest
25 steps:
26 - name: Checkout
27 uses: actions/checkout@v3
28
29 - uses: ./.github/actions/setup
30
31 - name: Install dependencies
32 run: pnpm install
33
34 - name: Install browsers
35 run: pnpm exec playwright install
36
37 - name: Build
38 run: pnpm --filter "@typespec/website..." run build
39
40 - name: Upload artifact
41 uses: actions/upload-pages-artifact@v3
42 with:
43 path: ./website/dist
44
45 # Deployment job
46 deploy:
47 environment:
48 name: github-pages
49 url: ${{ steps.deployment.outputs.page_url }}
50 runs-on: ubuntu-latest
51 needs: build
52 steps:
53 - name: Deploy to GitHub Pages
54 id: deployment
55 uses: actions/deploy-pages@v4
56