Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/ci-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
with:
working-directory: packages/website
start: yarn test-cypress
key: cypress-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
install-command: yarn install
browser: chrome
wait-on: 'http://localhost:8000'
Expand All @@ -70,7 +71,6 @@
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
typescript-version: [beta, next]
include:
Expand All @@ -80,9 +80,21 @@
- typescript-version: next
experimental: true
name: 'ts-canary'

steps:
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- run: yarn
- name: Installing TypeScript ${{ matrix.typescript-version }}
run: yarn workspaces foreach --exclude hello-ts --exclude '@mike-north/typescript-courses' -vpi add -D typescript@${{ matrix.typescript-version}}
- name: Build
run: yarn build
- name: Type-check website
run: yarn postinstall && yarn typecheck
- name: Test
run: yarn test
- name: Cypress
uses: cypress-io/github-action@v6
with:
node-version: ${{ env.NODE_VERSION }}
yarn-version: 3.6.4
Expand Down Expand Up @@ -132,37 +144,37 @@
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
needs: [build, ts-compatibility]
needs: [build]
runs-on: ubuntu-latest
if: success() && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
with:
node-version: ${{ env.NODE_VERSION }}
yarn-version: 3.6.4

# Add yarn cache
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- name: Restore yarn cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node-lts-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-lts-yarn-
${{ runner.os }}-node-lts-
${{ runner.os }}-

- run: yarn
- name: Build
run: yarn workspace website run build-prod
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
publish_dir: ./packages/website/public
cname: www.typescript-training.com

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
1 change: 0 additions & 1 deletion learn-typescript.code-workspace
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"folders": [
{ "name": "flights", "path": "packages/flights" },
{ "name": "website", "path": "packages/website" },
{ "name": "hello-ts", "path": "packages/hello-ts" }
],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@types/node": "^22.15.8",
"core-js": "^3.33.0",
"markdownlint-cli": "^0.37.0",
"replace-in-file": "^7.0.1"
Expand Down
17 changes: 17 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2970,6 +2970,7 @@ __metadata:
dependencies:
"@babel/core": ^7.23.2
"@babel/preset-typescript": ^7.23.2
"@types/node": ^22.15.8
core-js: ^3.33.0
markdownlint-cli: ^0.37.0
replace-in-file: ^7.0.1
Expand Down Expand Up @@ -5026,6 +5027,15 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^22.15.8":
version: 22.15.8
resolution: "@types/node@npm:22.15.8"
dependencies:
undici-types: ~6.21.0
checksum: f3bd1e9819b91b813b247eccac7c40b754df89a49cc48cc7fd69e9013b3bec84a0c071da97ea82addd138459686ff1b8fab690b956021897b69b4a490105e321
languageName: node
linkType: hard

"@types/node@npm:^8.5.7":
version: 8.10.66
resolution: "@types/node@npm:8.10.66"
Expand Down Expand Up @@ -23723,6 +23733,13 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.21.0":
version: 6.21.0
resolution: "undici-types@npm:6.21.0"
checksum: 46331c7d6016bf85b3e8f20c159d62f5ae471aba1eb3dc52fff35a0259d58dcc7d592d4cc4f00c5f9243fa738a11cfa48bd20203040d4a9e6bc25e807fab7ab3
languageName: node
linkType: hard

"unherit@npm:^1.0.4":
version: 1.1.3
resolution: "unherit@npm:1.1.3"
Expand Down
Loading