Skip to content

Commit c37f1c6

Browse files
Move preview to new deployment, pin dependencies, misc cleanup (microsoft#3091)
Co-authored-by: navya9singh <[email protected]>
1 parent eaa8205 commit c37f1c6

File tree

25 files changed

+103
-201
lines changed

25 files changed

+103
-201
lines changed

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: 'github-actions'
9+
directory: '/'
10+
schedule:
11+
interval: 'weekly'
12+
groups:
13+
github-actions:
14+
patterns:
15+
- '*'

.github/workflows/CI.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
# Check out, and set up the node/ruby infra
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
12+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
13+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
1414
with:
1515
node-version: "18.x"
1616

@@ -32,7 +32,7 @@ jobs:
3232
# Verify it compiles
3333
- run: yarn build-site
3434

35-
- uses: actions/upload-artifact@v4
35+
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
3636
if: github.event_name == 'pull_request'
3737
with:
3838
name: site
@@ -74,8 +74,8 @@ jobs:
7474

7575
steps:
7676
# Check out, and set up the node infra
77-
- uses: actions/checkout@v2
78-
- uses: actions/setup-node@v2
77+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
78+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
7979
with:
8080
node-version: "18.x"
8181

.github/workflows/close-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
steps:
1616
- uses: Azure/static-web-apps-deploy@v1
1717
with:
18-
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROD }}
18+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PREVIEW }}
1919
action: close
2020
app_location: /dev/null

.github/workflows/deploy-preview.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
steps:
2525
- name: Get PR/workflow run info
2626
id: get-info
27-
uses: actions/github-script@v7
27+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
2828
with:
2929
script: |
3030
let pr;
@@ -104,7 +104,7 @@ jobs:
104104
105105
- name: Download site build from PR
106106
if: ${{ steps.get-info.outputs.result != 'null' }}
107-
uses: actions/download-artifact@v4
107+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
108108
with:
109109
name: site
110110
path: site
@@ -116,7 +116,7 @@ jobs:
116116
if: ${{ steps.get-info.outputs.result != 'null' }}
117117
uses: Azure/static-web-apps-deploy@v1
118118
with:
119-
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROD }}
119+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PREVIEW }}
120120
repo_token: ${{ secrets.GITHUB_TOKEN }}
121121
action: "upload"
122122
app_location: "site"
@@ -127,7 +127,7 @@ jobs:
127127
- name: Comment on PR
128128
# azure/static-web-apps-deploy seems to comment itself when the event is pull_request_target
129129
if: ${{ steps.get-info.outputs.result != 'null' && github.event_name != 'pull_request_target' }}
130-
uses: actions/github-script@v7
130+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
131131
env:
132132
PR_NUMBER: ${{ fromJson(steps.get-info.outputs.result).pr }}
133133
SITE_URL: ${{ steps.deploy.outputs.static_web_app_url }}

.github/workflows/deploy-prod-static.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy to Azure Static Web Apps
1+
name: Deploy to GitHub Pages
22

33
on:
44
push:
@@ -26,11 +26,11 @@ jobs:
2626
runs-on: ubuntu-latest
2727

2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
3030
with:
3131
# Fetch the full history, to build attribution.json
3232
fetch-depth: 0
33-
- uses: actions/setup-node@v2
33+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
3434
with:
3535
node-version: "18.x"
3636
cache: yarn
@@ -53,16 +53,6 @@ jobs:
5353
env:
5454
YARN_CHECKSUM_BEHAVIOR: ignore
5555

56-
- name: Deploy
57-
id: builddeploy
58-
uses: Azure/static-web-apps-deploy@v1
59-
with:
60-
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROD }}
61-
repo_token: ${{ secrets.GITHUB_TOKEN }}
62-
action: "upload"
63-
app_location: "site"
64-
skip_app_build: true
65-
6656
- name: Setup Pages
6757
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
6858

@@ -80,4 +70,4 @@ jobs:
8070
steps:
8171
- name: Deploy to GitHub Pages
8272
id: deployment
83-
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
73+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

.github/workflows/keepalive.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
contents: write
1212

1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
1515
- run: |
1616
if [[ $(git log --format="%H" --since "50 days" | head -c1 | wc -c) == 0 ]]; then
1717
git config user.email "[email protected]"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish packages
2+
3+
on:
4+
push:
5+
branches: [v2]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Check out, and set up the node/ruby infra
14+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
15+
with:
16+
# Fetch the full history, to build attribution.json
17+
fetch-depth: 0
18+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
19+
with:
20+
node-version: "18.x"
21+
registry-url: "https://registry.npmjs.org/"
22+
cache: yarn
23+
24+
- name: Prepare website v2
25+
run: |
26+
yarn install
27+
yarn docs-sync pull microsoft/TypeScript-Website-localizations#main 1
28+
yarn bootstrap
29+
yarn workspace typescriptlang-org setup-playground-cache-bust
30+
yarn build
31+
env:
32+
YARN_CHECKSUM_BEHAVIOR: ignore
33+
34+
- name: Build website v2
35+
run: |
36+
yarn build-site
37+
cp -r packages/typescriptlang-org/public site
38+
39+
# Deploy
40+
- name: Deploy npm Packages
41+
run: |
42+
yarn pleb publish
43+
env:
44+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.github/workflows/update_teams.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/v2-merged-staging.yml

Lines changed: 0 additions & 75 deletions
This file was deleted.

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,9 @@ packages/sandbox/src/release_data.ts
8080
packages/typescriptlang-org/src/lib/documentationNavigation.ts
8181

8282
.idea/
83+
84+
**/.vscode/*
85+
!**/.vscode/tasks.json
86+
!**/.vscode/settings.template.json
87+
!**/.vscode/launch.json
88+
!**/.vscode/extensions.json

0 commit comments

Comments
 (0)