From f12786549b92ddaad0c7e76e0bea0a594c115aa6 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Sat, 29 Apr 2023 21:48:15 -0400 Subject: [PATCH 1/2] Move docs pipelines to use Actions --- .drone.yml | 126 --------------------- .github/workflows/pull-compliance_docs.yml | 23 ++++ .github/workflows/push-publish_docs.yml | 31 +++++ 3 files changed, 54 insertions(+), 126 deletions(-) create mode 100644 .github/workflows/pull-compliance_docs.yml create mode 100644 .github/workflows/push-publish_docs.yml diff --git a/.drone.yml b/.drone.yml index 5096ce781fe2..197ee131ffc4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -267,35 +267,6 @@ steps: - name: deps path: /go ---- -kind: pipeline -type: docker -name: compliance-docs - -platform: - os: linux - arch: amd64 - -trigger: - event: - - pull_request - paths: - include: - - "docs/**" - - "*.md" - -steps: - - name: deps-frontend - image: node:18 - pull: always - commands: - - make deps-frontend - - - name: lint-md - image: node:18 - commands: - - make lint-md - --- kind: pipeline type: docker @@ -1033,49 +1004,6 @@ steps: from_secret: github_token depends_on: [gpg-sign] ---- -kind: pipeline -type: docker -name: docs - -platform: - os: linux - arch: arm64 - -depends_on: - - compliance - -trigger: - event: - - push - - tag - - pull_request - paths: - include: - - "docs/**" - -steps: - - name: build-docs - image: gitea/test_env:linux-1.20-arm64 - commands: - - cd docs - - make trans-copy clean build - - - name: publish-docs - image: techknowlogick/drone-netlify:latest - pull: always - settings: - path: docs/public/ - site_id: d2260bae-7861-4c02-8646-8f6440b12672 - environment: - NETLIFY_TOKEN: - from_secret: netlify_token - when: - branch: - - main - event: - - push - --- kind: pipeline type: docker @@ -1818,57 +1746,3 @@ depends_on: - docker-linux-arm64-release - docker-linux-amd64-release-branch - docker-linux-arm64-release-branch - ---- -kind: pipeline -type: docker -name: notifications - -platform: - os: linux - arch: arm64 - -clone: - disable: true - -trigger: - branch: - - main - - "release/*" - event: - - push - - tag - status: - - success - - failure - -depends_on: - - testing-mysql - - testing-mysql8 - - testing-mssql - - testing-pgsql - - testing-sqlite - - release-version - - release-latest - - docker-linux-amd64-release - - docker-linux-arm64-release - - docker-linux-amd64-release-version - - docker-linux-arm64-release-version - - docker-linux-amd64-release-candidate-version - - docker-linux-arm64-release-candidate-version - - docker-linux-amd64-release-branch - - docker-linux-arm64-release-branch - - docker-manifest - - docker-manifest-version - - docs - -steps: - - name: discord - image: appleboy/drone-discord:1.2.4 - pull: always - settings: - message: "{{#success build.status}} āœ… Build #{{build.number}} of `{{repo.name}}` succeeded.\n\nšŸ“ Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\nšŸŒ {{ build.link }} {{else}} āŒ Build #{{build.number}} of `{{repo.name}}` failed.\n\nšŸ“ Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\nšŸŒ {{ build.link }} {{/success}}\n" - webhook_id: - from_secret: discord_webhook_id - webhook_token: - from_secret: discord_webhook_token diff --git a/.github/workflows/pull-compliance_docs.yml b/.github/workflows/pull-compliance_docs.yml new file mode 100644 index 000000000000..cc4897875e8f --- /dev/null +++ b/.github/workflows/pull-compliance_docs.yml @@ -0,0 +1,23 @@ + +name: Compliance testing for documentation + +on: + pull_request: + paths: + - "docs/**" + - "*.md" + +jobs: + compliance-docs: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + - name: setup node + uses: actions/setup-node@v2 + with: + node-version: 18 + - name: install dependencies + run: make deps-frontend + - name: lint markdown + run: make lint-md diff --git a/.github/workflows/push-publish_docs.yml b/.github/workflows/push-publish_docs.yml new file mode 100644 index 000000000000..6658830db0db --- /dev/null +++ b/.github/workflows/push-publish_docs.yml @@ -0,0 +1,31 @@ +name: Publish documentation + +on: + push: + paths: + - "docs/**" + branch: + - main + +jobs: + compliance-docs: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + - name: setup go + uses: actions/setup-go@v4 + with: + go-version: '>=1.20.1' + - name: build docs + run: | + cd docs + make trans-copy clean build + - name: publish to netlify + uses: nwtgck/actions-netlify@v2.0 + with: + production-branch: main + publish-dir: docs/public/ + site-id: d2260bae-7861-4c02-8646-8f6440b12672 + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} From cf9f6e09194b04dffcea0adf62dbcaaacd267b20 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 30 Apr 2023 18:38:21 +0800 Subject: [PATCH 2/2] Update .github/workflows/pull-compliance_docs.yml Co-authored-by: Yarden Shoham --- .github/workflows/pull-compliance_docs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pull-compliance_docs.yml b/.github/workflows/pull-compliance_docs.yml index cc4897875e8f..e3c3a4254123 100644 --- a/.github/workflows/pull-compliance_docs.yml +++ b/.github/workflows/pull-compliance_docs.yml @@ -1,4 +1,3 @@ - name: Compliance testing for documentation on: