From ebfdaf977bed9b739a26660aa17cdde9999b6e1d Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 4 Aug 2024 20:45:31 +0330 Subject: [PATCH 1/7] init --- .github/workflows/cr.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/cr.yml diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml new file mode 100644 index 000000000000..ad3acdd33c29 --- /dev/null +++ b/.github/workflows/cr.yml @@ -0,0 +1,30 @@ +name: Continuous Releases + +on: + push: + branches: + - main + - docusaurus-v** + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + release: + name: Continuous Releases + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Installation + run: yarn + + - name: Build packages + run: yarn build:packages + + - name: Release + run: npx pkg-pr-new publish './packages/*' --template './examples/*' --compact From c40b3523f6286e0f45edd9f42517153ef7235f8f Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Tue, 6 Aug 2024 16:51:57 +0330 Subject: [PATCH 2/7] test change --- packages/create-docusaurus/bin/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/create-docusaurus/bin/index.js b/packages/create-docusaurus/bin/index.js index 84d0c9e4f1d9..31b34343b73e 100755 --- a/packages/create-docusaurus/bin/index.js +++ b/packages/create-docusaurus/bin/index.js @@ -14,6 +14,7 @@ import logger from '@docusaurus/logger'; import semver from 'semver'; import {program} from 'commander'; +console.log('A test!'); const packageJson = /** @type {import("../package.json")} */ ( createRequire(import.meta.url)('../package.json') ); From b25fae10dc2e445f43fc1f5218367ff09f8c040b Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Thu, 8 Aug 2024 12:20:31 +0330 Subject: [PATCH 3/7] fresh examples --- .github/workflows/cr.yml | 7 ++++++- examples/classic/docusaurus.config.js | 1 + packages/create-docusaurus/bin/index.js | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml index ad3acdd33c29..b71f9d477232 100644 --- a/.github/workflows/cr.yml +++ b/.github/workflows/cr.yml @@ -26,5 +26,10 @@ jobs: - name: Build packages run: yarn build:packages + - name: Fresh templates + run: | + yarn create-docusaurus fresh-examples/docusaurus-classic classic --javascript -p npm -s + yarn create-docusaurus fresh-examples/docusaurus-classic-typescript classic --typescript -p npm -s + - name: Release - run: npx pkg-pr-new publish './packages/*' --template './examples/*' --compact + run: npx pkg-pr-new publish './packages/*' --template './fresh-examples/*' --compact --comment=off diff --git a/examples/classic/docusaurus.config.js b/examples/classic/docusaurus.config.js index 7b8d5b1c7f11..4688f7bfd1f3 100644 --- a/examples/classic/docusaurus.config.js +++ b/examples/classic/docusaurus.config.js @@ -6,6 +6,7 @@ import {themes as prismThemes} from 'prism-react-renderer'; +console.log('A test!'); /** @type {import('@docusaurus/types').Config} */ const config = { title: 'My Site', diff --git a/packages/create-docusaurus/bin/index.js b/packages/create-docusaurus/bin/index.js index 31b34343b73e..84d0c9e4f1d9 100755 --- a/packages/create-docusaurus/bin/index.js +++ b/packages/create-docusaurus/bin/index.js @@ -14,7 +14,6 @@ import logger from '@docusaurus/logger'; import semver from 'semver'; import {program} from 'commander'; -console.log('A test!'); const packageJson = /** @type {import("../package.json")} */ ( createRequire(import.meta.url)('../package.json') ); From d9ec68fa3314f71a435d6883d835de3d01cd02f5 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 8 Aug 2024 16:16:22 +0200 Subject: [PATCH 4/7] minor ci fixes --- .github/workflows/{cr.yml => continuous-releases.yml} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{cr.yml => continuous-releases.yml} (68%) diff --git a/.github/workflows/cr.yml b/.github/workflows/continuous-releases.yml similarity index 68% rename from .github/workflows/cr.yml rename to .github/workflows/continuous-releases.yml index b71f9d477232..80c1841f7ab8 100644 --- a/.github/workflows/cr.yml +++ b/.github/workflows/continuous-releases.yml @@ -26,10 +26,10 @@ jobs: - name: Build packages run: yarn build:packages - - name: Fresh templates + - name: Initialize fresh templates run: | - yarn create-docusaurus fresh-examples/docusaurus-classic classic --javascript -p npm -s - yarn create-docusaurus fresh-examples/docusaurus-classic-typescript classic --typescript -p npm -s + yarn create-docusaurus template/docusaurus-classic-js classic --javascript -p npm + yarn create-docusaurus template/docusaurus-classic-ts classic --typescript -p npm - name: Release - run: npx pkg-pr-new publish './packages/*' --template './fresh-examples/*' --compact --comment=off + run: npx pkg-pr-new publish './packages/*' --template './template/*' --compact --comment=off From eddfc7b61e3025133e8656c74f799698865ce15e Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 8 Aug 2024 16:17:51 +0200 Subject: [PATCH 5/7] test in docs --- packages/create-docusaurus/templates/shared/docs/intro.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/create-docusaurus/templates/shared/docs/intro.md b/packages/create-docusaurus/templates/shared/docs/intro.md index 45e8604c8bf8..480efe8f0e22 100644 --- a/packages/create-docusaurus/templates/shared/docs/intro.md +++ b/packages/create-docusaurus/templates/shared/docs/intro.md @@ -4,6 +4,8 @@ sidebar_position: 1 # Tutorial Intro +HELLO Mohammad! Welcome to Docusaurus! + Let's discover **Docusaurus in less than 5 minutes**. ## Getting Started From 4ffbc996939cf9cc2b1bb7ff3cd5f632e7d49c04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Thu, 8 Aug 2024 16:19:02 +0200 Subject: [PATCH 6/7] Update examples/classic/docusaurus.config.js --- examples/classic/docusaurus.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/classic/docusaurus.config.js b/examples/classic/docusaurus.config.js index 4688f7bfd1f3..7b8d5b1c7f11 100644 --- a/examples/classic/docusaurus.config.js +++ b/examples/classic/docusaurus.config.js @@ -6,7 +6,6 @@ import {themes as prismThemes} from 'prism-react-renderer'; -console.log('A test!'); /** @type {import('@docusaurus/types').Config} */ const config = { title: 'My Site', From 7d361c1a82e236151909aa1804a4050b1e2de719 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 8 Aug 2024 17:13:09 +0200 Subject: [PATCH 7/7] remove test --- packages/create-docusaurus/templates/shared/docs/intro.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/create-docusaurus/templates/shared/docs/intro.md b/packages/create-docusaurus/templates/shared/docs/intro.md index 480efe8f0e22..45e8604c8bf8 100644 --- a/packages/create-docusaurus/templates/shared/docs/intro.md +++ b/packages/create-docusaurus/templates/shared/docs/intro.md @@ -4,8 +4,6 @@ sidebar_position: 1 # Tutorial Intro -HELLO Mohammad! Welcome to Docusaurus! - Let's discover **Docusaurus in less than 5 minutes**. ## Getting Started