Skip to content

Commit

Permalink
chore: fix preview
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed May 6, 2024
1 parent 5ec1f29 commit 8aae82a
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/build-deploy-and-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,34 @@ on:
- reopened
- synchronize
- closed
branches: [main]

permissions:
contents: write
issues: write
pull-requests: write
id-token: write
pages: write
deployments: write

concurrency: preview-${{ github.ref }}

jobs:
deploy-preview:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- run: echo "PREVIEW_PATH=pr-preview/pr-${{ github.event.number }}" >> "$GITHUB_ENV"
- name: Install and Build
if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed
run: |
yarn install
yarn run build
run: yarn install && yarn build

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
- name: Deploy PR Preview
uses: rossjrw/pr-preview-action@v1.4.6
with:
source-dir: ./build/
token: ${{ secrets.AUTH_TOKEN}}
source-dir: ./dist/
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto

0 comments on commit 8aae82a

Please sign in to comment.