Skip to content

Add keepalive workflow #4366

Add keepalive workflow

Add keepalive workflow #4366

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- v2
jobs:
tests:
runs-on: ubuntu-latest
if: github.event.action != 'closed'
steps:
# Check out, and set up the node/ruby infra
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16.x"
# Install, should be basically instant if cached
- run: yarn install
env:
YARN_CHECKSUM_BEHAVIOR: ignore
# Verify dependencies are hooked up right
- run: node test/verifyPackageVersions.js
# Grab localizations
- run: yarn docs-sync pull microsoft/TypeScript-Website-localizations#main 1
# Build the packages
- run: yarn bootstrap
- run: yarn build
# Verify it compiles
- run: yarn build-site
- run: cp -r packages/typescriptlang-org/public site
# Run all the package's tests
- run: yarn test
env:
CI: true
# Deploy preview environment for non-forks
- uses: Azure/static-web-apps-deploy@v1
if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
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
# Upload site artifact for forks so it can be deployed by a maintainer on-demand
- uses: actions/upload-artifact@v3
if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id
with:
name: site-${{ github.event.number }}
path: site/
# danger for PR builds
- if: github.event_name == 'pull_request' && github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
run: "yarn danger ci"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_DEPLOY_URL_ROOT: ${{ steps.deploy.outputs.static_web_app_url }}
windows:
if: github.event.action != 'closed'
runs-on: windows-latest
steps:
# Check out, and set up the node infra
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16.x"
# Get local dependencies
- run: yarn install
env:
YARN_CHECKSUM_BEHAVIOR: ignore
- run: yarn bootstrap
- run: yarn build