Skip to content

Add Openfort signer guide for Smart Accounts Kit #2489

Add Openfort signer guide for Smart Accounts Kit

Add Openfort signer guide for Smart Accounts Kit #2489

Workflow file for this run

---
name: ci
on:
workflow_call:
pull_request:
branches:
- main
permissions:
contents: read
env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Build
uses: ConsenSys/github-actions/docs-build@main
case:
name: Check for case being inconsistent
runs-on: ubuntu-latest
strategy:
matrix:
folder: ['docs']
steps:
- uses: actions/checkout@v6
- name: Case check action
uses: ConsenSys/github-actions/docs-case-check@main
with:
DOC_DIR: ${{ matrix.folder }}
SKIP_TEST: true
lint:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Lint
uses: ConsenSys/github-actions/docs-lint-all@main
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Changed files (Prettier)
id: changed-files
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # 47.0.5; pin matches docs-spelling-check
with:
separator: "\n"
files: |
**/*.md
**/*.mdx
**/*.ts
**/*.tsx
**/*.js
**/*.jsx
**/*.json
**/*.css
**/*.scss
**/*.html
**/*.yml
**/*.yaml
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
- name: Install dependencies
run: npm ci
env:
NODE_ENV: development
HUSKY: 0
- name: Check formatting
if: steps.changed-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
set -euo pipefail
files_to_check=()
while IFS= read -r f || [ -n "$f" ]; do
[ -z "$f" ] && continue
if [ -f "$f" ]; then
files_to_check+=("$f")
fi
done <<< "$ALL_CHANGED_FILES"
if [ ${#files_to_check[@]} -eq 0 ]; then
echo "No existing files to check (skipping)."
exit 0
fi
./node_modules/.bin/prettier --check "${files_to_check[@]}"
- name: No Prettier-scoped files changed
if: steps.changed-files.outputs.any_changed != 'true'
run: echo "No matching changed files; Prettier check skipped."
# Vale checks spelling/style on changed .md/.mdx files and fails on real Vale errors,
# matching what runs locally (scripts/docs-pre-commit-check.sh) so "passes locally"
# means "passes on CI". The matrix keeps the required check names "Spelling (.md)" and
# "Spelling (.mdx)". Vale runs directly (not via the reviewdog-based composite action)
# so large PRs do not hit GitHub's 300-file diff limit, which is an infrastructure
# failure unrelated to content.
spelling:
name: Spelling
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
file-extensions: ['.md', '.mdx']
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Checkout Vale config
uses: actions/checkout@v6
with:
repository: Consensys/github-actions
path: .github-actions
- name: Changed files
id: changed-files
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # 47.0.5; pin matches docs-spelling-check
with:
path: .
files: '**/*${{ matrix.file-extensions }}'
separator: ','
- name: Install Vale
if: steps.changed-files.outputs.any_changed == 'true'
env:
VALE_VERSION: '3.15.1'
run: |
set -euo pipefail
curl -sSfL "https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz" -o /tmp/vale.tar.gz
sudo tar -xzf /tmp/vale.tar.gz -C /usr/local/bin vale
vale --version
(cd .github-actions/docs-spelling-check && vale sync)
- name: Run Vale
if: steps.changed-files.outputs.any_changed == 'true'
# Vale is advisory only and must not block merges: it produces false positives on
# valid technical content (code identifiers like `wagmi-tab`, product names,
# intentional ellipses). `continue-on-error` MUST be at the step (not the job) so
# the job still concludes "success" and the required "Spelling" check passes while
# findings stay visible in the logs. Job-level `continue-on-error` does not work
# here: it only keeps the overall run green, but the job's own check run stays
# "failure" and a required status check keeps blocking the merge.
continue-on-error: true
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
set -euo pipefail
files=()
IFS=',' read -ra raw <<< "$ALL_CHANGED_FILES"
for f in "${raw[@]}"; do
f="${f#"${f%%[![:space:]]*}"}"
f="${f%"${f##*[![:space:]]}"}"
[ -z "$f" ] && continue
[ -f "$f" ] && files+=("$f")
done
if [ ${#files[@]} -eq 0 ]; then
echo "No existing ${{ matrix.file-extensions }} files to check."
exit 0
fi
vale --config .github-actions/docs-spelling-check/.vale.ini "${files[@]}"
- name: No spelling-scoped files changed
if: steps.changed-files.outputs.any_changed != 'true'
run: echo 'No matching changed files; Vale check skipped.'
linkCheck:
name: Link Checking
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
env:
NODE_ENV: development
HUSKY: 0
- name: Generate Snaps API reference
run: npm run docusaurus snaps:generate
- name: LinkCheck
uses: ConsenSys/github-actions/docs-link-check@main
with:
CONFIG_FILE: '.linkspector.yml'