Skip to content

chore: bump patch #1148

chore: bump patch

chore: bump patch #1148

Workflow file for this run

name: Documentation
on:
push:
branches:
- main
- v*
tags:
- '**'
paths:
- 'packages/*/src/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build & Push Documentation
runs-on: ubuntu-latest
if: github.repository_owner == 'reciplejs'
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_SCOPE }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.ref || '' }}
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install Deno
uses: denoland/setup-deno@v2
with:
deno-version: vx.x.x
- name: Install Dependencies
run: bun install
- name: Build Packages
run: bun run build:packages
- name: Build Documentation
run: bun run docs
- name: Checkout Documentation Repository
uses: actions/checkout@v6
with:
token: ${{ secrets.DOCS_TOKEN }}
repository: reciplejs/docs
ref: main
path: out
- name: Format Tag
id: format-tag
if: ${{ github.ref_type == 'tag' }}
uses: ./scripts/actions/formatTag
with:
tag: ${{ github.ref_name }}
- name: Move Documentation Files (Tag)
if: ${{ github.ref_type == 'tag' }}
env:
PACKAGE_NAME: ${{ steps.format-tag.outputs.package }}
PACKAGE_VERSION: ${{ steps.format-tag.outputs.semver }}
run: |
declare -a PACKAGES=("core" "jsx" "modules" "reciple" "utils")
for PACKAGE in "${PACKAGES[@]}"; do
if [[ "${PACKAGE}" != "${PACKAGE_NAME}" ]]; then
continue
fi
mkdir -p "out/${PACKAGE_NAME}"
mv "docs/${PACKAGE_NAME}/docs.json" "out/${PACKAGE_NAME}/${PACKAGE_VERSION}.json"
done
- name: Move Documentation Files (Branch)
if: ${{ github.ref_type == 'branch' }}
run: |
declare -a PACKAGES=("core" "jsx" "modules" "reciple" "utils")
for PACKAGE in "${PACKAGES[@]}"; do
mkdir -p "out/${PACKAGE}"
mv "docs/${PACKAGE}/docs.json" "out/${PACKAGE}/${GITHUB_REF_NAME}.json"
done
- name: Push Documentation Files
if: ${{ github.ref_type == 'branch' || github.ref_type == 'tag' && contains(fromJson('["core", "jsx", "modules", "reciple", "utils"]'), steps.format-tag.outputs.package) }}
run: |
cd out
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git pull
git add .
git commit -m "chore: update documentation"
git pull --rebase
git push origin main