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
35 changes: 35 additions & 0 deletions .github/actions/extractChangelog.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { promises as fs } from 'node:fs';

/**
* Extracts the changelog section for a specific version from CHANGELOG.md
* @param {string} changelog - The full changelog content
* @param {string} version - The version to extract (e.g., "2.19.0")
* @returns {string} The changelog section for that version
*/
const extractVersionChangelog = (changelog, version) => {
const escapedVersion = version.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
const regex = new RegExp(`^#{1,2} \\[${escapedVersion}\\][^\\n]*\\n([\\s\\S]*?)(?=\\n#{1,2} \\[|$(?!\\n))`, 'm');
const match = changelog.match(regex);

if (match) {
return match[1].trim();
}

return `Release v${version}`;
};

export default async function run() {
const lerna = await fs.readFile(new URL('../../lerna.json', import.meta.url), 'utf8');
const { version } = JSON.parse(lerna);

try {
const changelog = await fs.readFile(new URL('../../CHANGELOG.md', import.meta.url), 'utf8');
const body = extractVersionChangelog(changelog, version);

console.log(body);
return body;
} catch (error) {
console.error('Error extracting changelog:', error);
return `Release v${version}`;
}
}
42 changes: 0 additions & 42 deletions .github/workflows/deploy-website-auto.yaml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/deploy-website-manually.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/deploy-website-on-release.yaml

This file was deleted.

90 changes: 90 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Deploy

on:
# Manual deployment trigger
workflow_dispatch:
inputs:
deploy_type:
description: 'type'
required: true
type: choice
options:
- 'nightly'
- 'latest'
default: 'nightly'

# Scheduled nightly deployments
schedule:
- cron: '0 0 * * *' # Runs daily at midnight UTC

jobs:
deploy-nightly:
if: ${{ github.event.inputs.deploy_type == 'nightly' || github.event_name == 'schedule' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.1.0
with:
node-version: 22
cache: 'yarn'

- name: Install
run: |
export NODE_OPTIONS="--max_old_space_size=4096"
yarn install

- name: Update version.md
run: |
touch packages/website/static/version.md
git log -1 &>> packages/website/static/version.md

- name: Build
env:
DEPLOYMENT_TYPE: "nightly"
run: |
yarn ci:deploy:nightly

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.7.6
with:
branch: gh-pages # The branch the action should deploy to.
folder: packages/website/build # The folder the action should deploy.
target-folder: nightly
clean: true

deploy-latest:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.deploy_type == 'latest' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.1.0
with:
node-version: 22
cache: 'yarn'

- name: Install
run: |
export NODE_OPTIONS="--max_old_space_size=4096"
yarn install

- name: Update version.md
run: |
touch packages/website/static/version.md
git log -1 &>> packages/website/static/version.md

- name: Build
env:
DEPLOYMENT_TYPE: "latest"
run: |
yarn ci:deploy

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.7.6
with:
branch: gh-pages # The branch the action should deploy to.
folder: packages/website/build # The folder the action should deploy.
clean: true
clean-exclude: |
nightly
v1
googlea519d963aa8f580f.html
34 changes: 0 additions & 34 deletions .github/workflows/merge-release-changelog.yaml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/release-downport.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/release-experimental.yaml

This file was deleted.

Loading
Loading