From 0df07a2b0fed0ad38c0bbb287a2940893aa70fc0 Mon Sep 17 00:00:00 2001 From: Yu Asabe Date: Wed, 21 Dec 2022 14:17:43 +0900 Subject: [PATCH] Add delpoy-docs workflow --- .github/workflows/deploy-docs.yaml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/deploy-docs.yaml diff --git a/.github/workflows/deploy-docs.yaml b/.github/workflows/deploy-docs.yaml new file mode 100644 index 0000000..6df361b --- /dev/null +++ b/.github/workflows/deploy-docs.yaml @@ -0,0 +1,41 @@ +name: deploy-docs + +on: + push: + branches: + - main + paths: + - mkdocs.yaml + - "**/*.md" + - "**/*.svg" + - "**/*.png" + - "**/*.jpg" + pull_request_target: + types: + - opened + - synchronize + - labeled + workflow_dispatch: + +jobs: + prevent-no-label-execution: + uses: autowarefoundation/autoware-github-actions/.github/workflows/prevent-no-label-execution.yaml@v1 + with: + label: deploy-docs + + deploy-docs: + needs: prevent-no-label-execution + if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }} + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + + - name: Deploy docs + uses: autowarefoundation/autoware-github-actions/deploy-docs@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + latest: ${{ github.event_name != 'pull_request_target' && github.ref_name == github.event.repository.default_branch }} \ No newline at end of file