The source code and dockerfile for the GSW2024 AI Lab.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

73 lines
1.9 KiB

2 months ago
  1. name: Manual Docs Versioning
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. version:
  6. description: 'Documentation version to create'
  7. required: true
  8. commit:
  9. description: 'Commit used to build the Documentation version'
  10. required: false
  11. latest:
  12. description: 'Latest version'
  13. type: boolean
  14. permissions:
  15. contents: write
  16. jobs:
  17. docs:
  18. name: Generate Website for new version
  19. runs-on: ubuntu-latest
  20. env:
  21. SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  22. steps:
  23. - uses: actions/checkout@v3
  24. if: inputs.commit == ''
  25. - uses: actions/checkout@v3
  26. if: inputs.commit != ''
  27. with:
  28. ref: ${{ inputs.commit }}
  29. - uses: actions/setup-python@v4
  30. with:
  31. python-version: '3.9'
  32. - name: Install dependencies
  33. run: pip install -r docs/requirements.txt
  34. - name: Register Envs
  35. run: pip install -e .
  36. - name: Build Envs Docs
  37. run: python docs/_scripts/gen_env_docs.py
  38. - name: Build Envs Display
  39. run: python docs/_scripts/gen_envs_display.py
  40. - name: Build
  41. run: sphinx-build -b dirhtml -v docs _build
  42. - name: Move 404
  43. run: mv _build/404/index.html _build/404.html
  44. - name: Update 404 links
  45. run: python docs/_scripts/move_404.py _build/404.html
  46. - name: Remove .doctrees
  47. run: rm -r _build/.doctrees
  48. - name: Upload to GitHub Pages
  49. uses: JamesIves/github-pages-deploy-action@v4
  50. with:
  51. folder: _build
  52. target-folder: ${{ inputs.version }}
  53. clean: false
  54. - name: Upload to GitHub Pages
  55. uses: JamesIves/github-pages-deploy-action@v4
  56. if: inputs.latest
  57. with:
  58. folder: _build
  59. clean-exclude: |
  60. *.*.*/
  61. main