-
Notifications
You must be signed in to change notification settings - Fork 46
ci(release): add documentation versioning to release workflow #1120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e791bfd
ci(release): add documentation versioning to release workflow
l2ysho b1d79bd
ci(docs-versioning): install website dependencies
l2ysho 42a6a1a
add website to workspaces
l2ysho 53ac896
claude suggested fixes
l2ysho 4adea4d
remove website/pnpm-lock
l2ysho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Version docs | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| version_docs: | ||
| name: Version docs | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ github.event.repository.default_branch }} | ||
| token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} | ||
|
|
||
| - name: Use Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
|
|
||
| - name: Install pnpm and dependencies | ||
| uses: apify/workflows/pnpm-install@main | ||
|
|
||
| - name: Snapshot the current version | ||
| id: version | ||
| run: | | ||
| VERSION=$(jq -r '.version' package.json) | ||
| MAJOR_MINOR=$(echo "$VERSION" | cut -d. -f1,2) | ||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
| cd website | ||
| rm -rf versioned_docs/version-$MAJOR_MINOR | ||
| rm -rf versioned_sidebars/version-$MAJOR_MINOR-sidebars.json | ||
| jq --arg v "$MAJOR_MINOR" 'map(select(. != $v))' versions.json > tmp.json && mv tmp.json versions.json | ||
| pnpm exec docusaurus docs:version $MAJOR_MINOR | ||
|
|
||
| - name: Format | ||
| working-directory: website | ||
| run: pnpm run prettify | ||
|
|
||
| - name: Commit and push the version snapshot | ||
| uses: EndBug/add-and-commit@v10 | ||
| with: | ||
| author_name: Apify Release Bot | ||
| author_email: noreply@apify.com | ||
| message: "docs: version docs for ${{ steps.version.outputs.version }} [skip ci]" | ||
| pull: "--rebase --autostash" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to also have a run step that runs pnpm install in website (they are not workspaces but maybe they should be?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no opinion over workspace, I will create an issue and we can discuss there. Also pnpm install added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other pnpm PRs added website to the workspace iirc, lets do it here as well. two places for inspiration are the JS client and SDK, both already migrated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok then :]