From 639e483e2d6d2334882fc3d0c6571d25e7e7b05c Mon Sep 17 00:00:00 2001 From: Bilal Bassam Date: Sat, 20 Jul 2024 01:31:23 +0300 Subject: [PATCH] Add an action for auto rebuilding wiki --- .github/workflows/rebuild-wiki.yml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/rebuild-wiki.yml diff --git a/.github/workflows/rebuild-wiki.yml b/.github/workflows/rebuild-wiki.yml new file mode 100644 index 0000000..e94097d --- /dev/null +++ b/.github/workflows/rebuild-wiki.yml @@ -0,0 +1,37 @@ +name: Rebuild Wiki + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - run: echo ${{ github.repository }} + + - run: echo $github.repository + + - uses: actions/checkout@v4 + with: + repository: '${{ github.repository }}.wiki.git' + path: '/wiki' + + - name: Install Luvit + run: curl -L https://github.com/luvit/lit/raw/master/get-lit.sh | sh + + - name: Generating wiki pages + run: ./luvit docgen.lua + + - name: Updating wiki repo + run: | + mv -f ./docs/* ./wiki/ + cd ./wiki + git add . + git commit -m '$(git rev-parse --short --verify main)' + git push