Spaces:
Sleeping
Sleeping
Download .github/workflows/preview.yml from Benaah/MicProtocol: direct link, hf CLI and curl.
- Browser
- Download file 1.46 kB
-
https://huggingface.co/spaces/Benaah/MicProtocol/resolve/main/.github/workflows/preview.yml
- Command line
-
hf download hf://spaces/Benaah/MicProtocol/.github/workflows/preview.yml
-
curl -L -o preview.yml https://huggingface.co/spaces/Benaah/MicProtocol/resolve/main/.github/workflows/preview.yml
1.46 kB
| name: Preview Deploy | |
| on: | |
| pull_request: | |
| branches: [main] | |
| types: [opened, reopened, synchronize] | |
| concurrency: | |
| group: preview-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| preview: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.15.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build web app | |
| run: pnpm --filter @guestflow/web build | |
| - name: Trigger preview deploy hook | |
| env: | |
| PREVIEW_DEPLOY_HOOK_URL: ${{ secrets.PREVIEW_DEPLOY_HOOK_URL }} | |
| run: | | |
| if [ -z "$PREVIEW_DEPLOY_HOOK_URL" ]; then | |
| echo "PREVIEW_DEPLOY_HOOK_URL is not configured. Skipping preview deployment trigger." | |
| exit 0 | |
| fi | |
| curl --fail --show-error --silent \ | |
| -X POST \ | |
| "$PREVIEW_DEPLOY_HOOK_URL" | |
| - name: Publish summary | |
| run: | | |
| echo "## Preview workflow" >> $GITHUB_STEP_SUMMARY | |
| echo "- Web build completed" >> $GITHUB_STEP_SUMMARY | |
| echo "- Preview deploy hook triggered if configured" >> $GITHUB_STEP_SUMMARY | |