Skip to content

fix deployment

fix deployment #60

name: deploy-website
on:
pull_request:
branches:
- master
types: [closed]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
publish:
if: ${{ github.event.pull_request.merged }}
name: Jsonlang website
runs-on: Ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
# Install and build Docusaurus website
- name: Build Docusaurus website
run: |
cd packages/website
npm install --ignore-scripts
npm run build
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: packages/website/build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}