Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:

publish:
name: Publish package to npm
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
needs: playwright
runs-on: ubuntu-latest
steps:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/netlify-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Netlify Preview

on: [pull_request]

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

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Restore packages cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts

- name: Build preview app
run: yarn build:preview

- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v3
with:
publish-dir: './dist-preview'
production-deploy: false
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "PR #${{ github.event.pull_request.number }} — ${{ github.event.pull_request.title }}"
alias: deploy-preview-${{ github.event.pull_request.number }}
enable-pull-request-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
File renamed without changes.
Loading
Loading