From a37a34434d1c1e94c94966b2c7c239f242a32bce Mon Sep 17 00:00:00 2001 From: Apisit Ritreungroj <38898766+apskhem@users.noreply.github.com> Date: Tue, 12 Dec 2023 19:28:53 +0700 Subject: [PATCH] feat: add a docs target into the pipeline (#129) * feat: docs target * fix: change docs uses to pages * docs: add the new stage * fix: docs ci pipeline --- .github/workflows/ci.yml | 12 ++++++++++++ .github/workflows/docs.yml | 30 ------------------------------ docs/src/onboarding/index.md | 6 ++++-- 3 files changed, 16 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 579d43b35..733ff4edd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,6 +144,18 @@ jobs: dockerhub_username: ${{ secrets.dockerhub_username }} earthly_runner_address: ${{ secrets.earthly_runner_address }} earthly_runner_secret: ${{ secrets.earthly_runner_secret }} + docs: + uses: ./.github/workflows/pages.yml + needs: [build, check, package, test] + with: + aws_role_arn: ${{ inputs.aws_role_arn }} + aws_region: ${{ inputs.aws_region }} + ci_cli_version: ${{ inputs.ci_cli_version }} + earthfile: ./docs + target: docs + secrets: + earthly_runner_address: ${{ secrets.earthly_runner_address }} + earthly_runner_secret: ${{ secrets.earthly_runner_secret }} release: uses: ./.github/workflows/release.yml needs: [build, check, package, test] diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 068a3f499..000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Docs - -on: - push: - branches: - - "**" - tags-ignore: - - '**' - -concurrency: - group: "docs" - cancel-in-progress: false - -permissions: - id-token: write - contents: write - packages: write - -jobs: - ci: - uses: ./.github/workflows/pages.yml - with: - aws_role_arn: arn:aws:iam::332405224602:role/ci - aws_region: eu-central-1 - ci_cli_version: 1.3.1 - earthfile: ./docs - target: docs - secrets: - earthly_runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }} - earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }} diff --git a/docs/src/onboarding/index.md b/docs/src/onboarding/index.md index 973bc9ea5..02f75f955 100644 --- a/docs/src/onboarding/index.md +++ b/docs/src/onboarding/index.md @@ -77,12 +77,13 @@ flowchart LR A[Check] --> B[Build] --> C[Package] --> D[Test] D --> E[Release] D --> F[Publish] + D --> G[Docs] ``` The full CI process consists of combining the discovery and execution mechanisms into a complete pipeline, as shown above. Each of the boxes represent a distinct stage which consists of discovering and then executing a target. -As previously mentioned, some stages, like the `release` and `publish` stages, have additional logic that occurs after executing the -target. +As previously mentioned, some stages, like the `release`, `publish`, and `docs` stages, +have additional logic that occurs after executing the target. Each stage is self-contained and the only dependency occurs when validating that the previous stage was successful. For example, the `build` stage will not execute until the `check` stage has passed. @@ -115,6 +116,7 @@ However, as a short introduction, here is a brief summary of each one: After the image is built by executing the target, the CI will perform other steps to transform the image. For example, tagging it with the git commit hash and performing general static analysis. The CI will automatically build and publish this image to configured registries during certain types of git events. +1. `docs` - This stage is expected to build and publish documentation. Each of the above stages are purely optional and can be combined to perform different types of CI workflows. For smaller projects, only a number of stages will be utilized initially.