From 4f703e9d3c452ad12c01d8f9ad4fe8ef55cf3898 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Wed, 26 Feb 2025 14:42:22 +0100 Subject: [PATCH] Added vitepress deploy to main workflow --- .github/workflows/main.yml | 46 ++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 02a829b..f4e4fab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,12 +7,18 @@ on: paths: - 'src/**' +permissions: + contents: write + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + jobs: build: runs-on: ubuntu-latest - permissions: - contents: write - steps: - name: Checkout repository uses: actions/checkout@v3 @@ -79,4 +85,36 @@ jobs: git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' git add config.lua src/LuaLS.lua release/basalt.lua CHANGELOG.md git commit -m "Update config, LuaLS definitions, bundle and changelog" || exit 0 - git push \ No newline at end of file + git push + + # Step 8: Build VitePress site + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Install dependencies + run: npm ci + + - name: Build with VitePress + run: npm run docs:build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: docs/.vitepress/dist + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: build + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file