docs-multiversion.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: Build multiversion docs
  2. on:
  3. push:
  4. branches: [ "master" ]
  5. tags: [ "v*", "V*"]
  6. env:
  7. GITHUB_REPOSITORY: ${{ github.repository }}
  8. GITHUB_REF: ${{ github.ref }}
  9. jobs:
  10. build-multiversion:
  11. if: github.repository == 'DragonOS-Community/DragonOS'
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v4
  15. with:
  16. fetch-depth: 0
  17. ref: master
  18. - name: install requirements
  19. working-directory: ./docs
  20. run: |
  21. sudo apt-get update
  22. sudo apt-get install -y python3-pip python3-setuptools
  23. pip3 install -r requirements.txt
  24. python3 -m pip install --user awscli
  25. - name: build docs
  26. working-directory: ./docs
  27. shell: bash -ileo pipefail {0}
  28. run: |
  29. make html-multiversion
  30. - name: deploy docs
  31. working-directory: ./docs
  32. env:
  33. AWS_ENDPOINT_URL: ${{ secrets.DOCS_DEPLOY_S3_ENDPOINT_URL }}
  34. AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_S3_API_KEY }}
  35. AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_S3_SECRET_KEY }}
  36. run: |
  37. aws s3 sync ./_build/html s3://dragonos-docs --delete --exclude "p/*"