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