From 858ecbd581446899bfbb3271f98d266d54606a46 Mon Sep 17 00:00:00 2001 From: Alexander Bigga Date: Wed, 1 Nov 2023 12:00:51 +0100 Subject: [PATCH] Add mkdocs workflow --- .github/workflows/build-deploy.yml | 51 ++++++++++++++++-------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 908d9ba9..102d50dc 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -10,7 +10,7 @@ env: NODE_VERSION: 18 jobs: - build: + build-deploy: runs-on: ubuntu-latest steps: @@ -44,28 +44,10 @@ jobs: - name: Make bundle run: npm run bundle - build-zip: - runs-on: ubuntu-latest - permissions: - contents: write - needs: build - steps: - - uses: actions/checkout@v4 - name: fail on fork if: github.repository_owner != 'verdigado' run: exit 1 - - name: Echo debug - run: | - echo "sunflower-${{ github.ref_name }}.zip" - ls -la - - - name: Install Dependencies - run: npm ci - - - name: Make bundle - run: npm run bundle - - name: Rename ZIP file run: | mv ../sunflower.zip sunflower-${{ github.ref_name }}.zip @@ -77,12 +59,35 @@ jobs: allowUpdates: true token: ${{ secrets.GITHUB_TOKEN }} - deploy: + - name: Provide deploy_key + env: + DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + run: | + mkdir "$HOME/.ssh" + echo "$DEPLOY_KEY" > "$HOME/.ssh/id_rsa" + file "$HOME/.ssh/id_rsa" + chmod 600 "$HOME/.ssh/id_rsa" + + - name: save version + run: echo ${GITHUB_REF##*/} > version.txt + + - name: rsync zipfile, version and changelog + run: rsync -a -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa" ../sunflower-${{ github.ref_name }}.zip version.txt github-ci@wordpress05.gcms.verdigado.net:/var/www/updateserver/ + + mkdocs: runs-on: ubuntu-latest - needs: build-zip + needs: build-deploy steps: - uses: actions/checkout@v4 + - name: mkdocs build + uses: Tiryoh/actions-mkdocs@v0 + with: + mkdocs_version: 'latest' # option + # mkdocs_version: '1.1' # option + # requirements: 'requirements.txt' # option + configfile: 'mkdocs/mkdocs.yml' # option + - name: Provide deploy_key env: DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }} @@ -95,5 +100,5 @@ jobs: - name: save version run: echo ${GITHUB_REF##*/} > version.txt - - name: rsync zipfile, version and changelog - run: rsync -z -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa" ../sunflower-${{ github.ref_name }}.zip version.txt github-ci@wordpress05.gcms.verdigado.net:/var/www/updateserver/ + - name: rsync documentation + run: rsync -a -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa" --delete documentation github-ci@wordpress05.gcms.verdigado.net:/var/www/documentation/