Skip to content

refactor: dep update (#1068) #4

refactor: dep update (#1068)

refactor: dep update (#1068) #4

name: Publish - Documentation
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "docs/**"
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: check out code 🛎
uses: actions/checkout@main
- name: Install pnpm
uses: pnpm/action-setup@master
with:
version: 9.9.0
- name: Install Node
uses: actions/setup-node@main
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build TypeDoc
run: pnpm run build:typedoc
- name: Build docs
run: pnpm run build
working-directory: ./docs
- name: Add CNAME
run: echo discordx.js.org > CNAME
working-directory: ./docs/build
- name: Upload artifact
uses: actions/upload-pages-artifact@main
with:
path: ./docs/build
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main