name: Update Online API Docs on: # Scheduled events for nightly API docs schedule: # UTC 00:00 everyday - cron: "0 0 * * *" # Events for API docs of new release push: branches: - main paths: - VERSION jobs: build_and_upload: runs-on: ubuntu-latest timeout-minutes: 15 container: asterinas/asterinas:0.4.2 steps: - uses: actions/checkout@v2 with: repository: 'asterinas/asterinas' path: 'asterinas' - name: Build & Upload Nightly API Docs if: github.event_name == 'schedule' env: API_DOCS_NIGHTLY_PUBLISH_KEY: ${{ secrets.API_DOCS_NIGHTLY_PUBLISH_KEY }} run: | KEY_FILE=./api_docs_nightly_publish_key echo "$API_DOCS_NIGHTLY_PUBLISH_KEY\n" > ${KEY_FILE} bash asterinas/tools/github_workflows/build_and_upload_api_docs.sh nightly ${KEY_FILE} - name: Build & Upload Release API Docs if: github.event_name == 'push' env: API_DOCS_PUBLISH_KEY: ${{ secrets.API_DOCS_PUBLISH_KEY }} run: | KEY_FILE=./api_docs_publish_key echo "$API_DOCS_PUBLISH_KEY\n" > ${KEY_FILE} bash asterinas/tools/github_workflows/build_and_upload_api_docs.sh release ${KEY_FILE}