diff --git a/.github/DOCUMENTATION_ISSUE_TEMPLATE.md b/.github/DOCUMENTATION_ISSUE_TEMPLATE.md new file mode 100644 index 0000000..9a996db --- /dev/null +++ b/.github/DOCUMENTATION_ISSUE_TEMPLATE.md @@ -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 }}) \ No newline at end of file diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 2470059..a177db3 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -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.' - }) \ No newline at end of file + filename: .github/DOCUMENTATION_ISSUE_TEMPLATE.md \ No newline at end of file