forked from microsoft/TypeScript-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.57 KB
/
deploy-prod-static.yml
File metadata and controls
56 lines (49 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Deploy to Azure Static Web Apps on push
on:
push:
branches:
- v2
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Fetch the full history, to build attribution.json
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: "14.x"
cache: yarn
# Builds the modules, and boostraps the other modules
- name: Build website
run: |
yarn install
yarn docs-sync pull microsoft/TypeScript-Website-localizations#main 1
yarn bootstrap
yarn workspace typescriptlang-org setup-playground-cache-bust
yarn build
env:
YARN_CHECKSUM_BEHAVIOR: ignore
- name: Makes the site
run: |
yarn build-site
cp -r packages/typescriptlang-org/public site
env:
YARN_CHECKSUM_BEHAVIOR: ignore
- 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_PROD }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "site"
skip_app_build: true
# Update the site stats
- run: node packages/typescriptlang-org/scripts/updateAppInsightsGitHubIssue.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_BOT_TOKEN }}
APP_INSIGHTS_API_KEY: ${{ secrets.APP_INSIGHTS_API_KEY }}
APP_INSIGHTS_ID: ${{ secrets.APP_INSIGHTS_ID }}