-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: adds onboarding documentation (#50)
- Loading branch information
Showing
25 changed files
with
1,870 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# WARNING: If you modify this workflow, please update the documentation | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
paths: | ||
- "docs/**" | ||
|
||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
# WARNING: If you modify this workflow, please update the documentation | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
earthfile: | ||
description: | | ||
The path to the folder containing the Earthfile that will be built. | ||
This path should be relative to the repository root. | ||
required: true | ||
type: string | ||
target: | ||
description: | | ||
The target used to mark check builds. This target should be unique | ||
across all Earthly files in the repository. The target should perform | ||
all required checks to validate an artifact: linting, formatting, and | ||
unit tests are common examples. | ||
The target that will be used to build docs. The target should always | ||
produce one artifact which is the static site that will be deployed to | ||
GitHub Pages. | ||
required: false | ||
type: string | ||
default: check | ||
default: docs | ||
aws_role_arn: | ||
description: | | ||
The ARN of the AWS role that will be assumed by the workflow. Only | ||
|
@@ -37,7 +44,7 @@ on: | |
earthly_runner_address: | ||
description: | | ||
The address of the Earthly runner that will be used to build the | ||
Earthly files. | ||
Earthfile. | ||
required: false | ||
earthly_runner_secret: | ||
description: | | ||
|
@@ -48,40 +55,8 @@ on: | |
required: false | ||
|
||
jobs: | ||
discover: | ||
run: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
json: ${{ steps.check.outputs.json }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup CI | ||
uses: input-output-hk/catalyst-ci/actions/setup@master | ||
with: | ||
cli_version: ${{ inputs.ci_cli_version }} | ||
earthly_skip_install: "true" | ||
- name: Discover Earthly files | ||
uses: input-output-hk/catalyst-ci/actions/discover@master | ||
id: discover | ||
with: | ||
targets: ${{ inputs.target }} | ||
- name: Check for empty output | ||
id: check | ||
run: | | ||
output=$(echo '${{ steps.discover.outputs.json }}' | jq -rc) | ||
if [ "$output" == "null" ]; then | ||
echo "json=[]" >> $GITHUB_OUTPUT | ||
else | ||
echo "json=$output" >> $GITHUB_OUTPUT | ||
fi | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: [discover] | ||
if: needs.discover.outputs.json != '[]' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
earthfile: ${{ fromJson(needs.discover.outputs.json) }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup CI | ||
|
@@ -92,10 +67,17 @@ jobs: | |
cli_version: ${{ inputs.ci_cli_version }} | ||
earthly_version: ${{ inputs.earthly_version }} | ||
earthly_runner_secret: ${{ secrets.earthly_runner_secret }} | ||
- name: Check | ||
- name: Build docs | ||
uses: input-output-hk/catalyst-ci/actions/run@master | ||
id: build | ||
with: | ||
earthfile: ${{ matrix.earthfile }} | ||
earthfile: ${{ inputs.earthfile }} | ||
target: ${{ inputs.target }} | ||
runner_address: ${{ secrets.earthly_runner_address }} | ||
runner_address: ${{ secrets.earthly_runner_address }} | ||
artifact: "true" | ||
- name: Publish docs | ||
uses: JamesIves/[email protected] | ||
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | ||
with: | ||
branch: gh-pages | ||
folder: ${{ steps.build.outputs.artifact }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# WARNING: If you modify this workflow, please update the documentation | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# WARNING: If you modify this workflow, please update the documentation | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
VERSION 0.7 | ||
|
||
deps: | ||
FROM python:3.11-bullseye | ||
DO ../earthly/python+POETRY_SETUP | ||
|
||
src: | ||
FROM +deps | ||
|
||
COPY --dir src mkdocs.yml . | ||
|
||
docs: | ||
FROM +src | ||
|
||
RUN poetry run mkdocs build --strict | ||
SAVE ARTIFACT site/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
site_name: Catalyst CI Documentation | ||
docs_dir: src | ||
theme: | ||
name: material | ||
features: | ||
- navigation.indexes | ||
- navigation.tracking | ||
nav: | ||
- Introduction: index.md | ||
- Onboarding: onboarding/index.md | ||
- Style Guide: style.md | ||
- Reference: | ||
- reference/index.md | ||
- Actions: reference/actions.md | ||
- Targets: reference/targets.md | ||
- Workflows: reference/workflows.md | ||
- UDCs: reference/udc.md | ||
- Appendix: | ||
- Earthly: appendix/earthly.md | ||
markdown_extensions: | ||
- admonition | ||
- pymdownx.details | ||
- pymdownx.superfences: | ||
custom_fences: | ||
- name: mermaid | ||
class: mermaid | ||
format: !!python/name:pymdownx.superfences.fence_code_format | ||
- pymdownx.tabbed: | ||
alternate_style: true |
Oops, something went wrong.