Skip to content

Commit

Permalink
shorter branch names
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Nov 3, 2024
1 parent 781b1d0 commit 37fa59a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/docs-preview-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@ on:
types: [docs-preview-create]

env:
ID: ${{ github.event.client_payload.package }}/${{ github.event.client_payload.owner }}/${{ github.event.client_payload.branch }}
BRANCH: preview-${{ github.event.client_payload.package }}-${{ github.event.client_payload.pr }}

jobs:
Sync:
runs-on: ubuntu-latest
steps:
- name: Set env vars
run: |
echo "BRANCH=preview/$ID" >> $GITHUB_ENV
echo "SLUG=preview-$(echo ${ID//\//})" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
Expand Down Expand Up @@ -59,7 +54,7 @@ jobs:
repository: ${{ github.event.client_payload.repo }}
issue-number: ${{ github.event.client_payload.pr }}
body: |
preview: https://svelte-dev-git-${{ env.SLUG }}-svelte.vercel.app/
preview: https://svelte-dev-git-${{ env.BRANCH }}-svelte.vercel.app/
_this is an automated message_
edit-mode: replace

0 comments on commit 37fa59a

Please sign in to comment.