Skip to content

Build and Deploy Documentation #19

Build and Deploy Documentation

Build and Deploy Documentation #19

name: Build and Deploy Documentation
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Run lint
run: yarn lint
build-and-deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/dev' && github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: 'pip'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Install Node dependencies
run: |
yarn install
yarn add git-directory-deploy
- name: Build documentation
run: ./build.sh
- name: Deploy to GitHub Pages
run: ./deploy.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}