Skip to content

Commit

Permalink
feat(ci): allow preview deployment on release branches
Browse files Browse the repository at this point in the history
  • Loading branch information
Thuan Vo committed Jun 5, 2023
1 parent d4cd1e9 commit 68dc683
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
push:
branches:
- main
- v[0-9]+
- v[0-9]+.[0-9]+
- cryostat-v[0-9]+.[0-9]+
paths:
- 'src/app/**'
- 'webpack.*.js'
Expand All @@ -19,8 +22,6 @@ on:
jobs:
build-preview:
if: ${{ github.repository_owner == 'cryostatio' }}
env:
DEPLOY_DOMAIN: ${{ github.repository_owner }}-${{ github.event.repository.name }}-main.surge.sh
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -33,4 +34,6 @@ jobs:
run: yarn build:preview:notests
- name: Publish to surge
run: |
FORMATTED_REF="$(echo ${{ github.ref_name }} | sed 's/\.//')"
DEPLOY_DOMAIN="${{ github.repository_owner }}-${{ github.event.repository.name }}-$FORMATTED_REF.surge.sh"
npx surge --project ./dist --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}

0 comments on commit 68dc683

Please sign in to comment.