|
19 | 19 | workflow_dispatch: |
20 | 20 |
|
21 | 21 | jobs: |
22 | | - prevent-no-label-execution: |
23 | | - uses: autowarefoundation/autoware-github-actions/.github/workflows/prevent-no-label-execution.yaml@v1 |
| 22 | + require-label: |
| 23 | + if: ${{ github.event_name == 'pull_request_target' }} |
| 24 | + uses: autowarefoundation/autoware-github-actions/.github/workflows/require-label.yaml@v1 |
24 | 25 | with: |
25 | 26 | label: tag:deploy-docs |
26 | 27 |
|
27 | | - deploy-docs: |
28 | | - needs: prevent-no-label-execution |
29 | | - if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }} |
| 28 | + deploy-docs-pr: |
| 29 | + if: ${{ github.event_name == 'pull_request_target' && needs.require-label.outputs.result == 'true' }} |
| 30 | + needs: require-label |
30 | 31 | runs-on: ubuntu-latest |
31 | 32 | steps: |
32 | 33 | - name: Check out repository |
33 | | - uses: actions/checkout@v5 |
| 34 | + uses: actions/checkout@v4 |
34 | 35 | with: |
35 | 36 | fetch-depth: 0 |
36 | 37 | ref: ${{ github.event.pull_request.head.sha }} |
|
39 | 40 | uses: autowarefoundation/autoware-github-actions/deploy-docs@v1 |
40 | 41 | with: |
41 | 42 | token: ${{ secrets.GITHUB_TOKEN }} |
42 | | - latest: ${{ github.event_name != 'pull_request_target' && github.ref_name == github.event.repository.default_branch }} |
| 43 | + latest: false |
| 44 | + |
| 45 | + deploy-docs-push: |
| 46 | + if: ${{ github.event_name == 'push' }} |
| 47 | + runs-on: ubuntu-latest |
| 48 | + steps: |
| 49 | + - name: Check out repository |
| 50 | + uses: actions/checkout@v4 |
| 51 | + with: |
| 52 | + fetch-depth: 0 |
| 53 | + |
| 54 | + - name: Deploy docs |
| 55 | + uses: autowarefoundation/autoware-github-actions/deploy-docs@v1 |
| 56 | + with: |
| 57 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 58 | + latest: ${{ github.ref_name == github.event.repository.default_branch }} |
| 59 | + |
| 60 | + deploy-docs-workflow-dispatch: |
| 61 | + if: ${{ github.event_name == 'workflow_dispatch' }} |
| 62 | + runs-on: ubuntu-latest |
| 63 | + steps: |
| 64 | + - name: Check out repository |
| 65 | + uses: actions/checkout@v4 |
| 66 | + with: |
| 67 | + fetch-depth: 0 |
| 68 | + |
| 69 | + - name: Deploy docs |
| 70 | + uses: autowarefoundation/autoware-github-actions/deploy-docs@v1 |
| 71 | + with: |
| 72 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 73 | + latest: false |
0 commit comments