forked from microsoft/TypeScript-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.78 KB
/
deploy-prod.yml
File metadata and controls
55 lines (47 loc) · 1.78 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
name: Monday Website Push To Production
on:
schedule:
# https://crontab.guru/#0_12_*_*_1
- cron: "0 12 * * 1"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "13.x"
- uses: microsoft/playwright-github-action@v1
# Build v2
- name: Build website v2
run: |
yarn install
yarn docs-sync pull microsoft/TypeScript-Website-localizations#main 1
yarn bootstrap
yarn build
yarn build-site
cp -r packages/typescriptlang-org/public site
env:
YARN_CHECKSUM_BEHAVIOR: ignore
# Deploy to the prod appservice
- name: Deploy + Publish to AppService
uses: peaceiris/actions-gh-pages@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: "SITE-PRODUCTION"
PUBLISH_DIR: ./site
# 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 }}
- name: Send a message to Microsoft Teams
if: ${{ failure() }}
uses: aliencube/microsoft-teams-actions@v0.8.0
with:
webhook_uri: ${{ secrets.TEAMS_WEB_BOT_INCOMING_URL }}
title: Prod deploy failed
summary: Could not build the site for production
actions: '[{ "@type": "OpenUri", "name": "View Logs", "targets": [{ "os": "default", "uri": "https://github.com/microsoft/TypeScript-Website/actions/runs/${{ github.run_id }}?check_suite_focus=true" }] }]'