Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actions/pnpm-install/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "pnpm install"
description: "Run pnpm install with cache enabled"
inputs:
path:
description: "Path to the directory containing the pnpm workspace"
default: "."
runs:
using: "composite"
steps:
Expand All @@ -13,6 +17,7 @@ runs:
name: Install pnpm
with:
run_install: false
package_json_file: ${{ inputs.path }}/package.json

- name: Expose pnpm config(s) through "$GITHUB_OUTPUT"
id: pnpm-config
Expand Down Expand Up @@ -40,3 +45,4 @@ runs:
pnpm install --frozen-lockfile --prefer-offline --loglevel error
env:
HUSKY: "0"
working-directory: ${{ inputs.path }}
34 changes: 16 additions & 18 deletions .github/workflows/push-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,32 @@ on:
- main
paths:
- "docs/**"
- "docs.json"
workflow_dispatch:

env:
SOURCE_PATH: cli

jobs:
synchronize:
runs-on: ubuntu-latest
steps:
- name: Checkout cli
uses: actions/checkout@v6
with:
path: cli
path: ${{ env.SOURCE_PATH }}

- name: Checkout docs
uses: actions/checkout@v6
- name: pnpm install
uses: ./cli/.github/actions/pnpm-install
with:
path: docs
repository: nanoforge-dev/docs
token: ${{ secrets.ACTIONS_KEY }}

- name: setup git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "username@users.noreply.github.com"
path: ${{ env.SOURCE_PATH }}

- name: synchronize docs
run: |
mkdir -p docs/docs/cli
cp cli/docs/. -r docs/docs/cli
cd docs
git add .
git commit -m "chore(cli): updating docs"
git push origin main
uses: ./cli/node_modules/@nanoforge-dev/actions/src/synchronize-docs
with:
source-docs: ${{ env.SOURCE_PATH }}/docs
destination-docs: docs/schematics
repository: nanoforge-dev/docs
config: ${{ env.SOURCE_PATH }}/docs.json
token: ${{ secrets.ACTIONS_KEY }}
commit-message: "chore(cli): synchronize docs"
4 changes: 4 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"group": "CLI",
"pages": ["docs/cli/index", "docs/cli/usage"]
}
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ catalogs:
'@commitlint/cli': ^20.5.0
'@commitlint/config-conventional': ^20.5.0
'@favware/cliff-jumper': ^6.1.0
'@nanoforge-dev/actions': ^1.3.0
'@nanoforge-dev/actions': ^1.4.2
husky: ^9.1.7
lint-staged: ^16.4.0
cli:
Expand Down
Loading