File tree Expand file tree Collapse file tree 8 files changed +41
-7
lines changed
Expand file tree Collapse file tree 8 files changed +41
-7
lines changed Original file line number Diff line number Diff line change 5656 env :
5757 ECOSYSTEM_CI_REF : ${{ inputs.commitSHA }}
5858 ECOSYSTEM_CI_TYPE : ' commit'
59+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
60+ RSBUILD_NETLIFY_SITE_ID : ${{ secrets.RSBUILD_NETLIFY_SITE_ID }}
61+ RSLIB_NETLIFY_SITE_ID : ${{ secrets.RSLIB_NETLIFY_SITE_ID }}
62+ RSPACK_NETLIFY_SITE_ID : ${{ secrets.RSPACK_NETLIFY_SITE_ID }}
63+ RSTEST_NETLIFY_SITE_ID : ${{ secrets.RSTEST_NETLIFY_SITE_ID }}
5964 steps :
6065 - uses : actions/checkout@v5
6166 - uses : ./.github/actions/build-rspress
9196 env :
9297 ECOSYSTEM_CI_REF : ${{ inputs.commitSHA }}
9398 ECOSYSTEM_CI_TYPE : ' commit'
99+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
100+ RSBUILD_NETLIFY_SITE_ID : ${{ secrets.RSBUILD_NETLIFY_SITE_ID }}
101+ RSLIB_NETLIFY_SITE_ID : ${{ secrets.RSLIB_NETLIFY_SITE_ID }}
102+ RSPACK_NETLIFY_SITE_ID : ${{ secrets.RSPACK_NETLIFY_SITE_ID }}
103+ RSTEST_NETLIFY_SITE_ID : ${{ secrets.RSTEST_NETLIFY_SITE_ID }}
94104 steps :
95105 - uses : actions/checkout@v5
96106 - uses : moonrepo/setup-rust@v1
Original file line number Diff line number Diff line change 5353 execute-selected-suite :
5454 runs-on : ubuntu-latest
5555 if : " inputs.suite != '-'"
56+ env :
57+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
58+ RSBUILD_NETLIFY_SITE_ID : ${{ secrets.RSBUILD_NETLIFY_SITE_ID }}
59+ RSLIB_NETLIFY_SITE_ID : ${{ secrets.RSLIB_NETLIFY_SITE_ID }}
60+ RSPACK_NETLIFY_SITE_ID : ${{ secrets.RSPACK_NETLIFY_SITE_ID }}
61+ RSTEST_NETLIFY_SITE_ID : ${{ secrets.RSTEST_NETLIFY_SITE_ID }}
5662 steps :
5763 - uses : actions/checkout@v5
5864 - uses : ./.github/actions/build-rspress
8591 fail-fast : false
8692 runs-on : ${{ matrix.os }}
8793 name : execute-all (${{ matrix.suite }})
94+ env :
95+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
96+ RSBUILD_NETLIFY_SITE_ID : ${{ secrets.RSBUILD_NETLIFY_SITE_ID }}
97+ RSLIB_NETLIFY_SITE_ID : ${{ secrets.RSLIB_NETLIFY_SITE_ID }}
98+ RSPACK_NETLIFY_SITE_ID : ${{ secrets.RSPACK_NETLIFY_SITE_ID }}
99+ RSTEST_NETLIFY_SITE_ID : ${{ secrets.RSTEST_NETLIFY_SITE_ID }}
88100 steps :
89101 - uses : actions/checkout@v5
90102 - uses : ./.github/actions/build-rspress
Original file line number Diff line number Diff line change 6262 env :
6363 ECOSYSTEM_CI_REF : ${{ inputs.ref }}
6464 ECOSYSTEM_CI_TYPE : ' branch'
65+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
66+ RSBUILD_NETLIFY_SITE_ID : ${{ secrets.RSBUILD_NETLIFY_SITE_ID }}
67+ RSLIB_NETLIFY_SITE_ID : ${{ secrets.RSLIB_NETLIFY_SITE_ID }}
68+ RSPACK_NETLIFY_SITE_ID : ${{ secrets.RSPACK_NETLIFY_SITE_ID }}
69+ RSTEST_NETLIFY_SITE_ID : ${{ secrets.RSTEST_NETLIFY_SITE_ID }}
6570 steps :
6671 - uses : actions/checkout@v5
6772 - uses : ./.github/actions/build-rspress
8388 env :
8489 ECOSYSTEM_CI_REF : ${{ inputs.ref }}
8590 ECOSYSTEM_CI_TYPE : ' branch'
91+ NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
92+ RSBUILD_NETLIFY_SITE_ID : ${{ secrets.RSBUILD_NETLIFY_SITE_ID }}
93+ RSLIB_NETLIFY_SITE_ID : ${{ secrets.RSLIB_NETLIFY_SITE_ID }}
94+ RSPACK_NETLIFY_SITE_ID : ${{ secrets.RSPACK_NETLIFY_SITE_ID }}
95+ RSTEST_NETLIFY_SITE_ID : ${{ secrets.RSTEST_NETLIFY_SITE_ID }}
8696 strategy :
8797 matrix :
8898 include :
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { RunOptions } from '../../types';
22import { cd , runInRepo } from '../../utils' ;
33import { MESSAGE , deployPreviewToNetlify } from './utils/_netlify' ;
44
5- const SITE_ID_ENV = 'RSPRESS_NETLIFY_SITE_ID_RSBUILD ' ;
5+ const SITE_ID_ENV = 'RSBUILD_NETLIFY_SITE_ID ' ;
66
77export async function test ( options : RunOptions ) {
88 await runInRepo ( {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { RunOptions } from '../../types';
22import { cd , runInRepo } from '../../utils' ;
33import { MESSAGE , deployPreviewToNetlify } from './utils/_netlify' ;
44
5- const SITE_ID_ENV = 'RSPRESS_NETLIFY_SITE_ID_RSLIB ' ;
5+ const SITE_ID_ENV = 'RSLIB_NETLIFY_SITE_ID ' ;
66
77export async function test ( options : RunOptions ) {
88 await runInRepo ( {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { RunOptions } from '../../types';
22import { cd , runInRepo } from '../../utils' ;
33import { MESSAGE , deployPreviewToNetlify } from './utils/_netlify' ;
44
5- const SITE_ID_ENV = 'RSPRESS_NETLIFY_SITE_ID_RSPACK ' ;
5+ const SITE_ID_ENV = 'RSPACK_NETLIFY_SITE_ID ' ;
66
77export async function test ( options : RunOptions ) {
88 await runInRepo ( {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { RunOptions } from '../../types';
22import { cd , runInRepo } from '../../utils' ;
33import { MESSAGE , deployPreviewToNetlify } from './utils/_netlify' ;
44
5- const SITE_ID_ENV = 'RSPRESS_NETLIFY_SITE_ID_RSTEST ' ;
5+ const SITE_ID_ENV = 'RSTEST_NETLIFY_SITE_ID ' ;
66
77export async function test ( options : RunOptions ) {
88 await runInRepo ( {
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ interface DeployOptions {
77 siteIdEnvVar ?: string ;
88}
99
10- const DEFAULT_OUTPUT_DIR = 'dist ' ;
11- const DEFAULT_NETLIFY_CLI = 'netlify-cli@17.38.1 ' ;
10+ const DEFAULT_OUTPUT_DIR = './website/doc_build ' ;
11+ const DEFAULT_NETLIFY_CLI = 'netlify-cli@23.10.0 ' ;
1212const DEFAULT_ALIAS = process . env . RSPRESS_NETLIFY_ALIAS ?? 'ecosystem-ci' ;
1313export const MESSAGE = `${ process . env . ECOSYSTEM_CI_TYPE } :${ process . env . ECOSYSTEM_CI_REF } ` ;
1414
@@ -36,9 +36,11 @@ export async function deployPreviewToNetlify(options: DeployOptions) {
3636 return ;
3737 }
3838
39+ console . log ( `[rspress][netlify] Deploying with alias: ${ alias } ` ) ;
40+
3941 const cliSpecifier = process . env . RSPRESS_NETLIFY_CLI ?? DEFAULT_NETLIFY_CLI ;
4042 const result =
41- await $ `pnpm dlx ${ cliSpecifier } deploy --dir=${ outputDir } --alias=${ alias } --message=${ message } --site=${ siteId } --confirm --json` ;
43+ await $ `pnpm --package= ${ cliSpecifier } dlx netlify deploy --dir=${ outputDir } --alias=${ alias } --message=${ message } --site=${ siteId } --auth= ${ authToken } --json` ;
4244
4345 try {
4446 const parsed = JSON . parse ( result ) ;
You can’t perform that action at this time.
0 commit comments