lazy.nvim/.github/workflows/deploy.yaml

89 lines
2.4 KiB
YAML
Raw Normal View History

2024-06-18 22:46:25 +01:00
name: Deploy to GitHub Pages
on:
push:
branches:
- docs
2024-06-19 05:53:23 +01:00
- main
workflow_dispatch:
2024-06-18 22:46:25 +01:00
jobs:
build:
2024-06-19 05:53:23 +01:00
name: Generate docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: docs
- name: Install Neovim
shell: bash
run: |
mkdir -p /tmp/nvim
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage
cd /tmp/nvim
chmod a+x ./nvim.appimage
./nvim.appimage --appimage-extract
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
- name: Generate docs
run: ./build.sh
2024-06-23 18:38:39 +01:00
- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: lazy.nvim
version: "Neovim >= 0.8.0"
description: "A modern plugin manager for Neovim"
demojify: false
treesitter: true
2024-06-19 05:53:23 +01:00
- name: Push changes
2024-06-23 09:19:14 +01:00
uses: stefanzweifel/git-auto-commit-action@v5
2024-06-19 05:53:23 +01:00
with:
commit_message: "chore(build): auto-generate docs"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
docusaurus:
2024-06-18 22:46:25 +01:00
name: Build Docusaurus
2024-06-19 05:53:23 +01:00
needs: build
2024-06-18 22:46:25 +01:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
2024-06-19 05:53:23 +01:00
ref: docs
2024-06-18 22:48:27 +01:00
- uses: pnpm/action-setup@v4
2024-06-18 22:46:25 +01:00
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build website
run: pnpm build
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build
deploy:
name: Deploy to GitHub Pages
2024-06-19 05:53:23 +01:00
needs: docusaurus
2024-06-18 22:46:25 +01:00
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4