Skip to content

Commit

Permalink
Fix on docusaurus build
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvdlinde committed Feb 8, 2025
1 parent 8a7ea7d commit 6c7b15a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 36 deletions.
24 changes: 24 additions & 0 deletions .github/DOCUMENTATION_ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Documentation Build Failed
assignees: ${{ github.actor }}
labels: documentation, bug
---

The documentation build has failed in the documentation workflow.

### Details
- Triggered by: @{{ payload.sender.login }}
- Commit: {{ sha }}
- Workflow run: {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}

### Error Information
Please check the workflow logs for detailed error information.

### Next Steps
1. Review the workflow logs
2. Check the Docusaurus build output
3. Verify documentation changes
4. Fix any identified issues
5. Push changes to trigger a new build

[View Workflow Logs]({{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }})
51 changes: 15 additions & 36 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,27 @@ jobs:
deploy:
name: Deploy Documentation
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
# https://github.com/marketplace/actions/docusaurus-builddeploy-action
- name: Deploy Docusaurus
id: deploy
uses: redkubes/docusaurus-deploy-action@v1
with:
node-version: 18
cache: npm
source-folder: website
git-user: github-actions[bot]
git-password: ${{ secrets.GITHUB_TOKEN }}
deployment-branch: gh-pages

- name: Install dependencies
run: |
cd website
npm ci
- name: Build website
run: |
cd website
npm run build
# Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/documentation'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com

# Notify on failure
- name: Notify on failure
# https://github.com/marketplace/actions/create-an-issue
- name: Create issue on failure
if: failure()
uses: actions/github-script@v6
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
script: |
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Documentation build failed',
body: 'The documentation build failed. Please check the workflow logs.'
})
filename: .github/DOCUMENTATION_ISSUE_TEMPLATE.md

0 comments on commit 6c7b15a

Please sign in to comment.