From c14b419263ef479808a754880f20ce8690331418 Mon Sep 17 00:00:00 2001 From: Bob <115008575+bobslavtriev@users.noreply.github.com> Date: Wed, 15 May 2024 16:39:51 -0300 Subject: [PATCH] Create update-docs.yml --- .github/workflows/update-docs.yml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/update-docs.yml diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml new file mode 100644 index 0000000..f915b3f --- /dev/null +++ b/.github/workflows/update-docs.yml @@ -0,0 +1,43 @@ +name: Update Docs + +permissions: + contents: write + +on: + push: + branches: + - main +jobs: + Build: + runs-on: ubuntu-latest + outputs: + package-name: ${{ steps.packageInfo.outputs.package-name }} + package-version: ${{ steps.packageInfo.outputs.package-version }} + commit-msg: ${{ steps.packageInfo.outputs.commit-msg }} + + steps: + - name: Checkout Commit + uses: actions/checkout@v2 + + - name: Parsing Package Info + id: packageInfo + run: | + echo "::set-output name=package-name::$(jq -r .name package.json)" + echo "::set-output name=package-version::$(jq -r .version package.json)" + echo "::set-output name=commit-msg::$(git log -1 --pretty=%B)" + + - name: Setup Node.js environment + uses: actions/setup-node@v2.1.1 + + - name: Install Dependencies + run: yarn + + - name: Build + run: yarn run build:all + + - name: Publish to Pages + uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: gh-pages + publish_dir: ./docs + github_token: ${{ secrets.GITHUB_TOKEN }}