-
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.05 KB
/
preview.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: 🔂 Surge PR Preview
on:
pull_request:
push:
branches: [testing]
jobs:
preview:
runs-on: ubuntu-latest
permissions:
pull-requests: write # allow surge-preview to create/update PR comments
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: 'pnpm'
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Install dependencies and Build
run: |
cd frontend
pnpm install
pnpm build
- uses: afc163/surge-preview@v1
id: preview_step
with:
github_token: ${{ github.token }}
surge_token: ${{ secrets.SURGE_TOKEN }}
dist: frontend/dist
teardown: true
failOnError: true
build: |
bash -c "echo Done"
- name: Get the preview_url
run: echo "url => ${{ steps.preview_step.outputs.preview_url }}"