diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 560c1db..eb92567 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,11 +1,20 @@ name: docs-ci-cd on: + workflow_dispatch: + inputs: + branch: + description: 'Ветка для прогона тестов' + required: true + default: test + type: choice + options: + - prod + - test + - stage push: tags: - 'docs-v*' - pull_request: - branches: [prod, test, stage] env: REGISTRY: gitea-http.gitea.svc.cluster.local:3000 @@ -14,9 +23,12 @@ env: jobs: test: + if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/docs-v') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }} - uses: actions/setup-node@v4 with: node-version: '24'