Skip to content

ci: pnpm

ci: pnpm #168

Workflow file for this run

name: Documentation Generator
on:
push:
branches:
- "*"
- "!docs"
tags:
- "*"
jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: latest
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Checkout docs branch
uses: actions/checkout@v4
with:
repository: distubejs/distubejs.github.io
ref: gh-pages
path: "docs"
token: ${{ secrets.DISTUBE_TOKEN }}
- name: Delete old docs
run: find "docs" -mindepth 1 -not -path ".git*" -exec rm -rf {} +
- name: Generate documentation
run: pnpm run docs
- name: Commit and push
run: |
cd docs
git config --local user.email [email protected]
git config --local user.name github-actions
git add .
git commit -m "Docs build for ${{ github.ref_type }} ${{ github.ref_name }}: ${{ github.sha }}"
git push