Skip to content

Commit

Permalink
chore: push deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejVukosav committed Jun 12, 2024
1 parent 0b6445a commit 5e7afdf
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/docusaurus_deploy.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]"
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 }}

0 comments on commit 5e7afdf

Please sign in to comment.