This website is built using Docusaurus 3, a modern static website generator.
This deploys through GitHub actions!
To use this site locally and see your doc rendered as website, just use the following commands.
npm install(only initially needed)npm start
This will install all dependencies necessary and run the website on http://localhost:3000/.
Every pull request against main is built by the Build pull request preview workflow. When the build
succeeds, the Deploy pull request preview workflow publishes the result to
https://eclipse-tractusx.github.io/pr/<pull-request-number>/
and posts (or updates) a comment on the pull request with the link and the commit the preview was built from. The preview is refreshed on every push and removed automatically once the pull request is closed or merged; the comment then says why the preview is gone.
This also works for pull requests opened from a fork: the preview is keyed by the pull request number rather than the branch name, and the build and the deployment are split into two workflows so that code from a fork is never executed with write permissions.
To keep the previews small enough for GitHub Pages, a preview only contains the pages the pull
request changes; every other page of the preview opens on the live website. The comment lists the
changed pages (see the workflow documentation).
Every deployment also checks the space left on GitHub Pages and removes the oldest previews if
needed, so the website itself can always be published. A removed preview can be published again
with gh workflow run deploy-pr-preview.yaml -f pr_number=<number>
(see Space on GitHub Pages).
To reproduce a preview build locally, set the same base URL and KIT versions that CI uses, and optionally remove the pages the branch does not change:
BASE_URL=/pr/1234/ DOCS_KITS_VERSIONS=current npm run build
git diff --name-only main... > changed-files.txt && node utils/prune-preview.js --changed-files changed-files.txt
npm run serveWe do want to follow a specific style for our markdown based documentation. Therefore, this repository is configured to use a markdown linter. Specific rules are configured via .markdownlint.yaml.
Additionally, there is a npm script lint-doc, that will lint all the markdown files inside docs and lint-kits, that will lint all the markdown files inside docs-kits.
This script is also run as a pre-commit hook, set up via husky.
You can also run the linting step manually by running npm run lint-doc or npm run lint-kits.
This repository enforces license compatibility checks on all Pull Requests. This is demanded by TRG 7.04.
Follow these steps if your PR's workflow fails on the action 3rd Party dependency check (Eclipse Dash):
- Make sure the error-message is not
[main] ERROR Error response from XYZ HTTP 524or anything else pointing to failures in remote services. If that happens, try again tomorrow. If not, continue. - Have java installed. Check by executing
java --versionin your bash terminal. For Windows Powershell or command prompt, this and the following commands may look different but should follow the same structure. - Download the jar of the dash license tool's latest release (for instance distributed via eclipse).
- Move the file into the top level folder of this repository. Do not add it to git or commit it.
- Navigate your terminal to the top level folder of this project (eclipse-tractusx.github.io).
- Execute
java -jar ./org.eclipse.dash.licenses-1.1.0.jar package-lock.json -project automotive.tractusx -summary ./DEPENDENCIESAdjust the version of the jar if necessary. You should see logs saying[main] INFO Querying X for license data for Y items.and[main] INFO Found Z items. - Commit the changed
DEPENDENCIESfile and push to your branch again.
This work is licensed under the CC-BY-4.0
- SPDX-License-Identifier: CC-BY-4.0
- SPDX-FileCopyrightText: 2022 Contributors to the Eclipse Foundation
- Source URL: https://github.com/eclipse-tractusx/eclipse-tractusx.github.io/README.md