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.

41 lines
1.1 KiB

2 months ago
2 months ago
2 months ago
  1. name: Build and Deploy MkDocs
  2. on:
  3. push:
  4. branches:
  5. - docstest
  6. jobs:
  7. deploy:
  8. runs-on: ubuntu-latest # Use Ubuntu as the runner environment
  9. steps:
  10. # Step 1: Checkout the repository
  11. - name: Checkout repository
  12. uses: actions/checkout@v3
  13. # Step 2: Set up Python environment
  14. - name: Set up Python
  15. uses: actions/setup-python@v4
  16. with:
  17. python-version: "3.x" # Specify the Python version
  18. # Step 3: Install MkDocs and dependencies
  19. - name: Install MkDocs
  20. run: |
  21. pip install mkdocs
  22. pip install mkdocs-material # Optional: MkDocs Material theme
  23. # Step 4: Build and Deploy to GitHub Pages
  24. - name: Deploy to GitHub Pages
  25. uses: peaceiris/actions-gh-pages@v3
  26. with:
  27. github_token: ${{ secrets.GITHUB_TOKEN }}
  28. publish_dir: ./site # Directory to publish (MkDocs builds here by default)
  29. # Optional: Add "cname: www.example.com" if using a custom domain
  30. # Step 5: Build MkDocs site
  31. - name: Build MkDocs site
  32. run: |
  33. cd docs
  34. mkdocs build