Skip to content

Commit

Permalink
fix pr preview deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyZJX committed Jan 4, 2024
1 parent b265fa6 commit cd5b5c3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/branch_preview.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Deploy branch preview (https://b.dsp-calc.pro)

on: [push, pull_request, workflow_dispatch]
on: [push, workflow_dispatch]

jobs:
build:
Expand All @@ -23,4 +23,4 @@ jobs:
zip -q -r ../dist.zip *
- name: Deploy branch site (https://b.dsp-calc.pro)
run: "curl --no-progress-meter --location 'https://publish.b.dsp-calc.pro/u?branch=${{ github.ref_name }}' --header 'Authorization: ${{ secrets.B_AUTH_TOKEN }}' --form 'file=@dist.zip'"
run: "curl --fail --no-progress-meter --location 'https://publish.b.dsp-calc.pro/u?branch=${{ github.ref_name }}' --header 'Authorization: ${{ secrets.B_AUTH_TOKEN }}' --form 'file=@dist.zip'"
26 changes: 26 additions & 0 deletions .github/workflows/pr_preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy external PR preview (https://b.dsp-calc.pro)

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest
environment: branch-preview

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20

- run: npm install
- run: npm run build

- name: Create dist.zip
run: |
cd dist
zip -q -r ../dist.zip *
- name: Deploy branch site (https://b.dsp-calc.pro)
run: "curl --fail --no-progress-meter --location 'https://publish.b.dsp-calc.pro/external/pr?branch=${{ github.ref_name }}' --form 'file=@dist.zip'"

0 comments on commit cd5b5c3

Please sign in to comment.