feat: moving to hub page style #2
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
| # .github/workflows/preview.yml | |
| # This is a basic workflow takes care of building and deploying | |
| # client when creating merge request | |
| name: Deploy PR previews | |
| on: | |
| pull_request_target: | |
| branches: | |
| - main | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - closed | |
| # do not allow running multiple of pipelines for this PR in parallel | |
| concurrency: preview-${{ github.ref }} | |
| jobs: | |
| deploy-preview: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: write | |
| pages: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - if: github.event.action != 'closed' | |
| run: | | |
| npm install | |
| npm run build -- --base /pr-preview/pr-${{ github.event.number }}/ | |
| - name: Deploy preview | |
| uses: rossjrw/pr-preview-action@v1 | |
| with: | |
| source-dir: .vitepress/dist/ |