
- Pinned actions by SHA https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies - Included permissions for some of the actions. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions Dependabot can upgrade pinned version of actions.
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Documentation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
|
|
changes:
|
|
permissions:
|
|
contents: read # for dorny/paths-filter to fetch a list of changed files
|
|
pull-requests: read # for dorny/paths-filter to read pull requests
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
(github.repository == 'kubernetes/ingress-nginx')
|
|
outputs:
|
|
docs: ${{ steps.filter.outputs.docs }}
|
|
charts: ${{ steps.filter.outputs.charts }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
|
|
|
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 # v2
|
|
id: filter
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
filters: |
|
|
docs:
|
|
- 'docs/**/*'
|
|
|
|
docs:
|
|
name: Update
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- changes
|
|
if: |
|
|
(github.repository == 'kubernetes/ingress-nginx') &&
|
|
(needs.changes.outputs.docs == 'true')
|
|
|
|
permissions:
|
|
contents: write # needed to write releases
|
|
|
|
steps:
|
|
|
|
- name: Checkout master
|
|
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
|
|
|
- name: Deploy
|
|
uses: ./.github/actions/mkdocs
|
|
env:
|
|
PERSONAL_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|