mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
[api-docs] Run using netlify builders (#8842)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
41
.github/workflows/release.yml
vendored
41
.github/workflows/release.yml
vendored
@@ -259,44 +259,3 @@ jobs:
|
||||
version: "${{ needs.init.outputs.tag }}",
|
||||
}
|
||||
})
|
||||
|
||||
deploy-api-docs:
|
||||
if: github.repository == 'esphome/esphome' && needs.init.outputs.branch_build == 'false'
|
||||
runs-on: ubuntu-latest
|
||||
needs: [init]
|
||||
environment: ${{ needs.init.outputs.deploy_env }}
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4.1.7
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4.4.0
|
||||
with:
|
||||
node-version: "22"
|
||||
|
||||
- name: Generate docs
|
||||
uses: mattnotmitt/doxygen-action@v1.12.0
|
||||
|
||||
- name: Deploy to netlify ${{ needs.init.outputs.deploy_env }}
|
||||
if: needs.init.outputs.deploy_env != 'production'
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
run: |
|
||||
npx netlify-cli deploy \
|
||||
--dir api-docs \
|
||||
--no-build \
|
||||
--alias "${{ needs.init.outputs.deploy_env }}" \
|
||||
--message "Deploy API docs for ${{ needs.init.outputs.tag }}"
|
||||
|
||||
- name: Deploy to netlify production
|
||||
if: needs.init.outputs.deploy_env == 'production'
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
run: |
|
||||
npx netlify-cli deploy \
|
||||
--dir api-docs \
|
||||
--no-build \
|
||||
--prod \
|
||||
--message "Deploy API docs for ${{ needs.init.outputs.tag }}"
|
||||
|
Reference in New Issue
Block a user