Repository navigation
docs(pm): add dedicated package management docs and command reference #2816
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Docs Preview | |
| permissions: {} | |
| on: | |
| pull_request: | |
| paths: | |
| - 'docs/**' | |
| - 'packages/cli/install.sh' | |
| - 'packages/cli/install.ps1' | |
| - 'packages/cli/install-legacy.sh' | |
| - 'packages/cli/install-legacy.ps1' | |
| - '.github/workflows/deploy-docs-preview.yml' | |
| - '.github/actions/deploy-docs/**' | |
| concurrency: | |
| group: deploy-docs-preview-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| staging-deploy: | |
| if: >- | |
| github.repository == 'voidzero-dev/vite-plus' && | |
| github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| env: | |
| PREVIEW_URL: https://viteplus-staging.void.app/ | |
| steps: | |
| - uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2 | |
| - uses: ./.github/actions/deploy-docs | |
| with: | |
| void-project: viteplus-staging | |
| void-token: ${{ secrets.VOID_TOKEN }} | |
| site-origin: https://viteplus-staging.void.app | |
| # PR builds reuse cached results but never upload them. | |
| remote-cache: read | |
| - name: Comment on PR | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 | |
| env: | |
| PREVIEW_URL: ${{ env.PREVIEW_URL }} | |
| with: | |
| script: | | |
| const marker = '<!-- staging-deploy -->'; | |
| const body = `${marker}\n✅ Staging deployment successful!\n\nPreview: ${process.env.PREVIEW_URL}\nCommit: ${context.payload.pull_request.head.sha}`; | |
| const comments = await github.paginate(github.rest.issues.listComments, { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| }); | |
| const existing = comments.find(c => c.body.includes(marker)); | |
| if (existing) { | |
| await github.rest.issues.updateComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: existing.id, | |
| body, | |
| }); | |
| } else { | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body, | |
| }); | |
| } |