From 88c5c713aa4df17e17b325280175892970708fad Mon Sep 17 00:00:00 2001 From: RGBCube <78925721+RGBCube@users.noreply.github.com> Date: Sat, 14 Jan 2023 13:51:30 +0300 Subject: [PATCH] DRY --- .github/workflows/deploy-docs.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 551490f..e375efa 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -2,6 +2,9 @@ name: Deploy Docs on: push +env: + project-name: bonfire + jobs: deploy-docs: runs-on: ubuntu-latest @@ -22,13 +25,13 @@ jobs: - name: Generate Docs run: | - mv ./src ./bonfire.v # For the docs header - cp ./README.md ./bonfire.v/ # For the README to be included in the docs. - v doc -readme -f html -o ./ -m ./bonfire.v + mv ./src ./${{ env.project-name }}.v # For the docs header + cp ./README.md ./${{ env.project-name }}.v/ # For the README to be included in the docs. + v doc -readme -f html -o ./ -m ./${{ env.project-name }}.v - rm -rf ./site/docs/bonfire || true - mkdir -p ./site/docs/bonfire - cp -r ./_docs/* ./site/docs/bonfire/ + rm -rf ./site/docs/${{ env.project-name }} || true + mkdir -p ./site/docs/${{ env.project-name }} + cp -r ./_docs/* ./site/docs/${{ env.project-name }}/ - name: Add Private Key To SSH Agent uses: webfactory/ssh-agent@v0.7.0 @@ -44,5 +47,5 @@ jobs: git config user.email "actions@users.noreply.github.com" git add ./ - git commit -m "Deploy bonfire.v docs" + git commit -m "Deploy ${{ env.project-name }}.v docs" git push git@github.com:RGBCube/rgbcube.github.io master