Skip to content

Commit 9115175

Browse files
authored
docs: add setup-vp GitHub Action docs and update install URLs to staging (#624)
- Update install URLs from viteplus.dev to staging.viteplus.dev in README.md, docs/vite/guide/index.md, and packages/cli/README.md - Add GitHub Actions section to README.md with setup-vp@v1 example - Add CI/CD section to docs guide with basic usage and matrix testing examples closes VP-193
1 parent 87936e8 commit 9115175

File tree

4 files changed

+89
-9
lines changed

4 files changed

+89
-9
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
workflow_dispatch:
99
pull_request:
1010
types: [opened, synchronize, labeled]
11-
paths-ignore:
12-
- '**/*.md'
1311
push:
1412
branches:
1513
- main
@@ -25,7 +23,25 @@ defaults:
2523
shell: bash
2624

2725
jobs:
26+
detect-changes:
27+
runs-on: ubuntu-latest
28+
permissions:
29+
contents: read
30+
pull-requests: read
31+
outputs:
32+
code-changed: ${{ steps.filter.outputs.code }}
33+
steps:
34+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
35+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
36+
id: filter
37+
with:
38+
filters: |
39+
code:
40+
- '!**/*.md'
41+
2842
download-previous-rolldown-binaries:
43+
needs: detect-changes
44+
if: needs.detect-changes.outputs.code-changed == 'true'
2945
runs-on: ubuntu-latest
3046
permissions:
3147
contents: read
@@ -36,6 +52,8 @@ jobs:
3652
with:
3753
github-token: ${{ secrets.GITHUB_TOKEN }}
3854
test:
55+
needs: detect-changes
56+
if: needs.detect-changes.outputs.code-changed == 'true'
3957
name: Test
4058
strategy:
4159
fail-fast: false
@@ -71,6 +89,8 @@ jobs:
7189
- run: cargo test $(for d in crates/*/; do echo -n "-p $(basename $d) "; done)
7290

7391
lint:
92+
needs: detect-changes
93+
if: needs.detect-changes.outputs.code-changed == 'true'
7494
name: Lint
7595
runs-on: ubuntu-latest
7696
steps:
@@ -558,6 +578,7 @@ jobs:
558578
559579
done:
560580
runs-on: ubuntu-latest
581+
if: always()
561582
needs:
562583
- test
563584
- lint
@@ -566,4 +587,4 @@ jobs:
566587
steps:
567588
- run: exit 1
568589
# Thank you, next https://github.com/vercel/next.js/blob/canary/.github/workflows/build_and_test.yml#L379
569-
if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}
590+
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ Install Vite+ globally as `vp`:
2727
For Linux or macOS:
2828

2929
```bash
30-
curl -fsSL https://viteplus.dev/install.sh | bash
30+
curl -fsSL https://staging.viteplus.dev/install.sh | bash
3131
```
3232

3333
For Windows:
3434

3535
```bash
36-
irm https://viteplus.dev/install.ps1 | iex
36+
irm https://staging.viteplus.dev/install.ps1 | iex
3737
```
3838

3939
`vp` handles the full development lifecycle such as package management, development servers, linting, formatting, testing and building for production.
@@ -84,6 +84,17 @@ You can migrate an existing project to Vite+:
8484
vp migrate
8585
```
8686

87+
### GitHub Actions
88+
89+
Use the official [`setup-vp`](https://github.com/voidzero-dev/setup-vp) action to install Vite+ in GitHub Actions:
90+
91+
```yaml
92+
- uses: voidzero-dev/setup-vp@v1
93+
with:
94+
node-version: '22'
95+
cache: true
96+
```
97+
8798
#### Manual Installation & Migration
8899
89100
If you are manually migrating a project to Vite+, install these dev dependencies first:

docs/vite/guide/index.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ Install Vite+ globally as `vp`:
2323
For Linux or macOS:
2424

2525
```bash
26-
curl -fsSL https://viteplus.dev/install.sh | bash
26+
curl -fsSL https://staging.viteplus.dev/install.sh | bash
2727
```
2828

2929
For Windows:
3030

3131
```bash
32-
irm https://viteplus.dev/install.ps1 | iex
32+
irm https://staging.viteplus.dev/install.ps1 | iex
3333
```
3434

3535
## Node.js Version Manager
@@ -136,6 +136,43 @@ View cache operations:
136136
vp run build -r --debug
137137
```
138138

139+
## CI/CD
140+
141+
Use the official [`setup-vp`](https://github.com/voidzero-dev/setup-vp) GitHub Action to install Vite+ in CI:
142+
143+
### Basic usage
144+
145+
```yaml
146+
steps:
147+
- uses: actions/checkout@v4
148+
- uses: voidzero-dev/setup-vp@v1
149+
with:
150+
node-version: '22'
151+
cache: true
152+
- run: vp run build -r
153+
- run: vp run test -r
154+
```
155+
156+
### Matrix testing
157+
158+
```yaml
159+
jobs:
160+
test:
161+
strategy:
162+
matrix:
163+
node-version: ['20', '22', '24']
164+
runs-on: ubuntu-latest
165+
steps:
166+
- uses: actions/checkout@v4
167+
- uses: voidzero-dev/setup-vp@v1
168+
with:
169+
node-version: ${{ matrix.node-version }}
170+
cache: true
171+
- run: vp run test -r
172+
```
173+
174+
See the [setup-vp README](https://github.com/voidzero-dev/setup-vp) for all options.
175+
139176
## Next Steps
140177
141178
- Learn more about [task configuration](./task/getting-started)

packages/cli/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ Install Vite+ globally as `vp`:
2525
For Linux or macOS:
2626

2727
```bash
28-
curl -fsSL https://viteplus.dev/install.sh | bash
28+
curl -fsSL https://staging.viteplus.dev/install.sh | bash
2929
```
3030

3131
For Windows:
3232

3333
```bash
34-
irm https://viteplus.dev/install.ps1 | iex
34+
irm https://staging.viteplus.dev/install.ps1 | iex
3535
```
3636

3737
`vp` handles the full development lifecycle such as package management, development servers, linting, formatting, testing and building for production.
@@ -82,6 +82,17 @@ You can migrate an existing project to Vite+:
8282
vp migrate
8383
```
8484

85+
### GitHub Actions
86+
87+
Use the official [`setup-vp`](https://github.com/voidzero-dev/setup-vp) action to install Vite+ in GitHub Actions:
88+
89+
```yaml
90+
- uses: voidzero-dev/setup-vp@v1
91+
with:
92+
node-version: '22'
93+
cache: true
94+
```
95+
8596
#### Manual Installation & Migration
8697
8798
If you are manually migrating a project to Vite+, install these dev dependencies first:

0 commit comments

Comments
 (0)