From 5e7afdf314deabf72e2a129050c026a03b284ea6 Mon Sep 17 00:00:00 2001 From: "matej.vukosav" Date: Wed, 12 Jun 2024 12:36:08 +0200 Subject: [PATCH] chore: push deploy workflow --- .github/workflows/docusaurus_deploy.yml | 51 +++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/docusaurus_deploy.yml diff --git a/.github/workflows/docusaurus_deploy.yml b/.github/workflows/docusaurus_deploy.yml new file mode 100644 index 00000000..90035c63 --- /dev/null +++ b/.github/workflows/docusaurus_deploy.yml @@ -0,0 +1,51 @@ +name: Deploy Docusaurus Site + +on: + push: + branches: + - master + paths: + - 'docs/**' + workflow_dispatch: + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Change to docs Directory + run: cd docs && pnpm install && pnpm build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/build + + notify-on-failure: + runs-on: ubuntu-latest + needs: [build-and-deploy] + if: failure() + steps: + - name: Notify failure + uses: "ravsamhq/notify-slack-action@2.5.0" + with: + status: failure + notification_title: "Docusaurus Deploy failed on ${{ github.ref_name }} - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Failure>" + message_format: ":fire: *Deploy Core Documentation to Pages* in <${{ github.server_url }}/${{ github.repository }}/${{ github.ref_name }}|${{ github.repository }}>" + footer: "Linked Repo <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Failure>" + env: + SLACK_WEBHOOK_URL: ${{ secrets.DEPLOY_FAIL_SLACK }}