Skip to content

Commit

Permalink
fix(doc): Docs were no longer being built and deployed in CI (#1494)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjameswh authored Aug 14, 2024
1 parent 5d633df commit 56207d8
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 28 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IS_OFFICIAL_REPO: ${{ github.repository == 'temporalio/sdk-typescript' }}
# Is it the official main branch, or an official release branches?
IS_MAIN_OR_RELEASE: |
${{
github.repository == 'temporalio/sdk-typescript'
&& (github.ref == 'refs/heads/main'
|| startsWith(github.ref, 'refs/tags/')
|| startsWith(github.ref, 'refs/heads/releases'))
&& github.event_name != 'pull_request'
}}
# AFAIK there's no way to break that line w/o introducing a trailing LF that breaks usage. Sorry.
IS_MAIN_OR_RELEASE: ${{ github.repository == 'temporalio/sdk-typescript' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/releases')) && github.event_name != 'pull_request' }}

# Use these variables to force specific version of CLI/Time Skipping Server for SDK tests
# TESTS_CLI_VERSION: 'v0.13.2'
# TESTS_TIME_SKIPPING_SERVER_VERSION: 'v1.24.1'
Expand Down Expand Up @@ -105,7 +100,7 @@ jobs:
prefix-key: corebridge-buildcache
shared-key: ${{ matrix.platform }}
env-vars: ''
save-if: env.IS_MAIN_OR_RELEASE == 'true'
save-if: ${{ env.IS_MAIN_OR_RELEASE == 'true' }}

- name: Compile rust code
if: steps.cached-artifact.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -203,7 +198,7 @@ jobs:
- name: Save NPM cache
uses: actions/cache/save@v4
# Only saves NPM cache from the main branch, to reduce pressure on the cache (limited to 10GB).
if: env.IS_MAIN_OR_RELEASE == 'true'
if: ${{ env.IS_MAIN_OR_RELEASE == 'true' }}
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
Expand Down Expand Up @@ -571,7 +566,7 @@ jobs:
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}

- name: Deploy prod docs # TODO: only deploy prod docs when we publish a new version
if: env.IS_MAIN_OR_RELEASE == 'true'
if: ${{ env.IS_MAIN_OR_RELEASE == 'true' }}
run: npx vercel deploy packages/docs/build -t ${{ secrets.VERCEL_TOKEN }} --name typescript --scope temporal --prod --yes

# FIXME: This is not working properly, and should probably be done only from the main branch anyway
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,9 @@ env:
TEMPORAL_TESTING_MEM_LOG_DIR: /tmp/worker-mem-logs
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REUSE_V8_CONTEXT: ${{ inputs.reuse-v8-context }}
IS_MAIN_BRANCH: |
${{
github.repository == 'temporalio/sdk-typescript'
&& (github.ref == 'refs/heads/main'
|| startsWith(github.ref, 'refs/tags/')
|| startsWith(github.ref, 'refs/heads/releases'))
&& github.event_name != 'pull_request'
}}
# Is it the official main branch, or an official release branches?
# AFAIK there's no way to break that line w/o introducing a trailing LF that breaks usage. Sorry.
IS_MAIN_OR_RELEASE: ${{ github.repository == 'temporalio/sdk-typescript' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/releases')) && github.event_name != 'pull_request' }}

jobs:
stress-test:
Expand All @@ -62,6 +57,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ inputs.ref }}

- name: Install Node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -99,7 +95,7 @@ jobs:
prefix-key: corebridge-buildcache
shared-key: linux-intel
env-vars: ''
save-if: env.IS_MAIN_BRANCH == 'true'
save-if: ${{ env.IS_MAIN_OR_RELEASE == 'true' }}

- name: Download dependencies
# Make up to 3 attempts to install NPM dependencies, to work around transient NPM errors
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"lint.prune": "ts-prune --error -p tsconfig.prune.json --ignore \"used in module\" --skip \".d.ts\"",
"format": "prettier --write . && lerna run --no-bail --stream format",
"clean": "node ./scripts/clean.mjs",
"docs": "lerna run --stream maybe-install-deps-and-build-docs"
"docs": "cd packages/docs && npm run maybe-install-deps-and-build-docs"
},
"dependencies": {
"@temporalio/client": "file:packages/client",
Expand Down
1 change: 0 additions & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@temporalio/docs",
"version": "1.9.3",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand Down

0 comments on commit 56207d8

Please sign in to comment.