Skip to content

Commit

Permalink
Separated the step that publishes the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cowwoc committed Oct 31, 2024
1 parent ababfe9 commit bbfc592
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/deploy_to_npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,15 @@ jobs:
cp ../../pnpm-lock.yaml .
git status
pnpm publish --provenance --access=public --no-git-checks
mkdir --parents "${{ needs.open-release.outputs.VERSION }}/docs"
mv target/apidocs "${{ needs.open-release.outputs.VERSION }}/docs/api"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Commit changes
- name: Publish documentation
run: |
git checkout gh-pages -f
echo "INITIAL_GH_PAGES_POSITION=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
mkdir --parents "${{ needs.open-release.outputs.VERSION }}/docs"
mv target/apidocs "${{ needs.open-release.outputs.VERSION }}/docs/api"
git add "${{ needs.open-release.outputs.VERSION }}/docs/api"
git commit -m "Released version ${{ needs.open-release.outputs.VERSION }}"
git push
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![npm version](https://badge.fury.io/js/%40cowwoc%2Frequirements.svg)](https://badge.fury.io/js/%40cowwoc%2Frequirements)
[![build-status](https://github.com/cowwoc/requirements.js/workflows/Build/badge.svg)](https://github.com/cowwoc/requirements.js/actions?query=workflow%3ABuild)

# <img src="https://raw.githubusercontent.com/cowwoc/requirements.js/release-4.0.2/docs/checklist.svg?sanitize=true" width=64 height=64 alt="checklist"> Requirements API
# <img src="https://raw.githubusercontent.com/cowwoc/requirements.js/release-4.0.3/docs/checklist.svg?sanitize=true" width=64 height=64 alt="checklist"> Requirements API

[![API](https://img.shields.io/badge/api_docs-5B45D5.svg)](https://cowwoc.github.io/requirements.js/4.0.2/docs/api/)
[![API](https://img.shields.io/badge/api_docs-5B45D5.svg)](https://cowwoc.github.io/requirements.js/4.0.3/docs/api/)
[![Changelog](https://img.shields.io/badge/changelog-A345D5.svg)](docs/Changelog.md)
[![java](https://img.shields.io/badge/other%20languages-java-457FD5.svg)](../../../requirements.java)

Expand All @@ -18,13 +18,13 @@ A [fluent API](https://en.m.wikipedia.org/docs/Fluent_interface) for enforcing
To get started, add this dependency:

```shell
npm install --save @cowwoc/[email protected].2
npm install --save @cowwoc/[email protected].3
```

or [pnpm](https://pnpm.io/):

```shell
pnpm add @cowwoc/[email protected].2
pnpm add @cowwoc/[email protected].3
```

## Usage Example
Expand Down Expand Up @@ -146,11 +146,11 @@ This library offers the following features:
Designed for discovery using your favorite IDE's auto-complete feature.
The main entry points are:

* [requireThat(value, name)](https://cowwoc.github.io/requirements.js/4.0.2/docs/api/module-DefaultRequirements.html#~requireThat)
* [requireThat(value, name)](https://cowwoc.github.io/requirements.js/4.0.3/docs/api/module-DefaultRequirements.html#~requireThat)
for method preconditions.
* [assertThat(value, name)](https://cowwoc.github.io/requirements.js/4.0.2/docs/api/module-DefaultRequirements.html#~assertThat)
* [assertThat(value, name)](https://cowwoc.github.io/requirements.js/4.0.3/docs/api/module-DefaultRequirements.html#~assertThat)
for [class invariants, method postconditions and private methods](docs/Features.md#assertion-support).
* [checkIf(value, name)](https://cowwoc.github.io/requirements.js/4.0.2/docs/api/module-DefaultRequirements.html#~checkIf)
* [checkIf(value, name)](https://cowwoc.github.io/requirements.js/4.0.3/docs/api/module-DefaultRequirements.html#~checkIf)
for multiple failures and customized error handling.

See the [API documentation](https://cowwoc.github.io/requirements.java/10.0/docs/api/) for more details.
Expand Down
2 changes: 1 addition & 1 deletion docs/Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ requireThat(nameToAge, "nameToAge").
## String diff

When
a [String comparison](https://cowwoc.github.io/requirements.js/4.0.2/docs/api/ObjectVerifier.html#isEqualTo)
a [String comparison](https://cowwoc.github.io/requirements.js/4.0.3/docs/api/ObjectVerifier.html#isEqualTo)
fails, the library outputs a diff of the values being compared.

Depending on the terminal capability, you will see a [textual](Textual_Diff.md) or a colored diff.
Expand Down
2 changes: 1 addition & 1 deletion docs/String_Diff.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
When
a [String comparison](https://cowwoc.github.io/requirements.js/4.0.2/docs/api/ObjectVerifier.html#isEqualTo)
a [String comparison](https://cowwoc.github.io/requirements.js/4.0.3/docs/api/ObjectVerifier.html#isEqualTo)
fails, the library outputs a [diff](https://en.wikipedia.org/wiki/Diff) of the values being compared.

Depending on the terminal capability, you will see a [Textual](Textual_Diff.md) or [Colored](Colored_Diff.md)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowwoc/requirements",
"version": "4.0.2",
"version": "4.0.3",
"keywords": [
"preconditions",
"postconditions",
Expand Down

0 comments on commit bbfc592

Please sign in to comment.