Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move docs pipelines to use Actions #24434

Merged
merged 7 commits into from
Apr 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
126 changes: 0 additions & 126 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
23 changes: 23 additions & 0 deletions .github/workflows/pull-compliance_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

lunny marked this conversation as resolved.
Show resolved Hide resolved
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup-node is already at v3, but I guess I will fix that with the upcoming node 20 upgrade.

with:
node-version: 18
- name: install dependencies
run: make deps-frontend
- name: lint markdown
run: make lint-md
31 changes: 31 additions & 0 deletions .github/workflows/push-publish_docs.yml
Original file line number Diff line number Diff line change
@@ -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 }}