Skip to content

Update: Node, Connection, Poru #7

Update: Node, Connection, Poru

Update: Node, Connection, Poru #7

name: Test deployment
concurrency: gh-pages-preview-${{ github.ref }}
on:
pull_request:
branches:
# change this branch name incase v5 branch is deleted/moved.
- v5
paths:
- "website/**"
- "**.ts"
- "README.md"
types:
- opened
- reopened
- synchronize
- closed
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
jobs:
test-deploy:
# setting the working directory as that's where the docs/website exists.
defaults:
run:
working-directory: ./website
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
if: github.event.action != 'closed'
- name: Write docusaurus heading ids
run: npm run write-heading-ids
if: github.event.action != 'closed'
- name: Test build website
run: npm run build
env:
previewBaseURL: /${{ github.event.repository.name }}/pr-preview/pr-${{ github.event.pull_request.number }}
if: github.event.action != 'closed'
- uses: rossjrw/pr-preview-action@v1
with:
# using ./website/build as when an github action is used with uses it doesn't see for defaults.run.working-directory.
source-dir: ./website/build
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto