diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 6db3bfa..1aee52c 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -4,17 +4,45 @@ on: push: branches: - docs - # Review gh actions docs if you want to further define triggers, paths, etc - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on + - main + workflow_dispatch: jobs: build: + 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 + - name: Push changes + uses: stefanzweifel/git-auto-commit-action@v4 + 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] " + + docusaurus: name: Build Docusaurus + needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 + ref: docs - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: @@ -33,7 +61,7 @@ jobs: deploy: name: Deploy to GitHub Pages - needs: build + needs: docusaurus # Grant GITHUB_TOKEN the permissions required to make a Pages deployment permissions: diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 71719fc..287e762 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -16,7 +16,6 @@ const config: Config = { organizationName: "folke", // Usually your GitHub org/user name. projectName: "lazy.nvim", // Usually your repo name. - deploymentBranch: "gh-pages", // Even if you don't use internationalization, you can use this field to set // useful metadata like html lang. For example, if your site is Chinese, you