blank.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: github pages
  2. # Execute this workflow only for Pushes to your main branch, not for PRs
  3. on:
  4. push:
  5. branches:
  6. - main
  7. # Provides the implicitly used and hidden GITHUB_TOKEN the necessary permissions to deploy github_pages
  8. permissions:
  9. contents: write
  10. pages: write
  11. id-token: write
  12. # Execute a job called "api-docs"
  13. jobs:
  14. api-docs:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v3
  18. - uses: jiro4989/setup-nim-action@v1
  19. with:
  20. nim-version: 2.0.8
  21. - run: nimble install -Y
  22. # Optional, if you require any packages to be installed from the package manager
  23. # Remove this step if you don't need it.
  24. # - name: Setup dependencies
  25. # run: |
  26. # sudo apt update -y
  27. # sudo apt install -y <space separated package list>
  28. - name: Build your docs
  29. run: nimble docs
  30. - name: Copy files to _site directory
  31. run: |
  32. mkdir _site
  33. cp -r docs/* _site
  34. - name: Upload _site directory for deploy job
  35. uses: actions/upload-pages-artifact@v1 # This will automatically upload an artifact from the '/_site' directory
  36. # Deploy _site directory with permissions of GITHUB_TOKEN
  37. deploy:
  38. environment:
  39. name: github-pages
  40. runs-on: ubuntu-latest
  41. needs: api-docs
  42. steps:
  43. - name: Deploy to GitHub Pages
  44. id: deployment
  45. uses: actions/deploy-pages@v1