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
102 changes: 0 additions & 102 deletions .build/ci.yaml

This file was deleted.

8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "alauda/Doom" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/cool-planets-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alauda/doom': patch
---

ci: enable workflows for automatic management
4 changes: 4 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"node": "18",
"sandboxes": []
}
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: alauda
42 changes: 42 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: autofix.ci # For security reasons, the workflow in which the autofix.ci action is used must be named "autofix.ci".

on:
pull_request:
types:
- opened
- reopened
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

jobs:
autofix:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js LTS
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: lts/*
cache: yarn

- name: Install dependencies
run: yarn --immutable

- name: Build
run: yarn build

- name: Format Codes
run: yarn format

- name: Apply autofix.ci
uses: autofix-ci/action@2891949f3779a1cafafae1523058501de3d4e944 # v1
with:
fail-fast: false
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
- push
- pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: Build and Lint with Node.js ${{ matrix.node }} on ${{ matrix.os }}
strategy:
matrix:
node:
- 18
- 20
- 22
- 24
os:
- ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ matrix.node }}
cache: yarn

- name: Install Dependencies
run: yarn --immutable

- name: Build and Lint
run: |
yarn build
yarn lint
env:
PARSER_NO_WATCH: true
39 changes: 39 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: GitHub Pages

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js LTS
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: lts/*
cache: yarn

- name: Install Dependencies
run: yarn --immutable

- name: Build the project
run: yarn doom build -b doom

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
full_commit_message: ${{ github.event.head_commit.message }}
35 changes: 35 additions & 0 deletions .github/workflows/pkg-pr-new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Any Commit

on:
- push
- pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js LTS
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: lts/*
cache: yarn

- name: Install dependencies
run: yarn --immutable

- name: Build
run: yarn build

- name: Publish
run: yarn dlx pkg-pr-new publish # --compact
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

on:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write
id-token: write
pull-requests: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Setup Node.js LTS
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: lts/*

- name: Install Dependencies
run: yarn --immutable

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
commit: 'chore: release @alauda/doom'
title: 'chore: release @alauda/doom'
publish: yarn release
version: yarn run version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "0.22.2",
"type": "module",
"description": "Doctor Doom making docs.",
"repository": "https://gitlab-ce.alauda.cn/idp/Doom.git",
"repository": "git+https://github.com/alauda/Doom.git",
"homepage": "https://github.com/alauda/Doom#readme",
"packageManager": "yarn@4.9.1",
"engines": {
"node": ">=18.17.0 <20 || >=20.1.0"
Expand Down Expand Up @@ -34,11 +35,12 @@
"lint": "run-p 'lint:*'",
"lint:es": "eslint . --cache",
"lint:tsc": "tsc -b",
"prepare": "simple-git-hooks && patch-package && yarn-berry-deduplicate",
"prepublishOnly": "yarn build",
"prepare": "simple-git-hooks && patch-package && yarn-berry-deduplicate || exit 0",
"release": "yarn build && clean-pkg-json && changeset publish",
"serve": "yarn doom serve",
"swc-node": "node --enable-source-maps --import @swc-node/register/esm-register",
"translate": "yarn doom translate fixture-docs"
"translate": "yarn doom translate fixture-docs",
"version": "changeset version && yarn --no-immutable"
},
"dependencies": {
"@inquirer/prompts": "^7.5.0",
Expand Down Expand Up @@ -77,6 +79,8 @@
"yoctocolors": "^2.1.1"
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.3",
"@eslint/js": "^9.26.0",
"@swc-node/register": "^1.10.10",
"@swc/core": "1.11.24",
Expand All @@ -89,6 +93,7 @@
"@types/react-dom": "^18.3.7",
"@types/swagger2openapi": "^7.0.4",
"@unts/patch-package": "^8.1.1",
"clean-pkg-json": "^1.3.0",
"eslint": "^9.26.0",
"eslint-import-resolver-typescript": "^4.3.4",
"eslint-plugin-import-x": "^4.11.0",
Expand Down
Loading