Browse Source

fix(docs): Use publish:local script in CI workflow

- Add --tag latest to publish:local script for prerelease versions
- Simplify CI workflow to use the existing publish:local script
David Höck 1 day ago
parent
commit
a2f4a3bb58
2 changed files with 2 additions and 12 deletions
  1. 1 11
      .github/workflows/publish_docs.yml
  2. 1 1
      docs/package.json

+ 1 - 11
.github/workflows/publish_docs.yml

@@ -41,15 +41,5 @@ jobs:
       - name: Install dependencies
         run: npm install
 
-      - name: Build
-        run: npm run build
-
-      - name: Generate timestamp version
-        id: version
-        run: echo "version=0.0.0-$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
-
-      - name: Set package version
-        run: npm version ${{ steps.version.outputs.version }} --no-git-tag-version
-
       - name: Publish to NPM
-        run: npm publish --access public
+        run: npm run publish:local

+ 1 - 1
docs/package.json

@@ -22,7 +22,7 @@
         "prebuild": "npm run generate-dates",
         "build": "rimraf dist && tsc -p ./tsconfig.build.json",
         "prepublishOnly": "npm run test:mdx && npm run build",
-        "publish:local": "npm version 0.0.0-$(date +%Y%m%d%H%M) --no-git-tag-version && npm publish",
+        "publish:local": "npm version 0.0.0-$(date +%Y%m%d%H%M) --no-git-tag-version && npm publish --tag latest",
         "publish:local:next": "npm version 0.0.0-$(date +%Y%m%d%H%M) --no-git-tag-version && npm publish --tag next",
         "test:mdx": "tsx scripts/test-mdx.ts",
         "test:mdx:verbose": "tsx scripts/test-mdx.ts --verbose",