-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add Netlify configuration and advanced build (#892)
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com> Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com> Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
- Loading branch information
Showing
21 changed files
with
1,027 additions
and
261 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
.github/actions/update-documentation/scripts/requirements.txt
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
.github/actions/update-documentation/scripts/update_docs.py
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
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,85 @@ | ||
name: Release Documentation | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
tag_name: | ||
description: "Tag for the functions runner image" | ||
type: "string" | ||
required: true | ||
page_dir: | ||
description: "Root directory of the website" | ||
type: "string" | ||
required: true | ||
default: "./tmp/page" | ||
docs_dir: | ||
description: "Root directory of the website" | ||
type: "string" | ||
required: true | ||
default: "/docs" | ||
dry_run: | ||
description: "Flag for testing" | ||
type: "boolean" | ||
default: false | ||
required: false | ||
|
||
jobs: | ||
release-docs: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Checkout - page branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: "page" | ||
path: ${{ inputs.page_dir }} | ||
token: ${{ secrets.KEPTN_BOT_TOKEN }} | ||
|
||
- name: Get Latest Release Information | ||
uses: octokit/request-action@v2.x | ||
id: latest_release | ||
with: | ||
route: GET /repos/:owner/:repository/releases/latest | ||
repository: lifecycle-toolkit | ||
owner: keptn | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Detect needed Folder Operations | ||
id: folder | ||
run: | | ||
CURRENT_VERSION=`cat ${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/docs/version || "unknown"` | ||
echo $CURRENT_VERSION | ||
if [[ "${{ fromJson(steps.latest_release.outputs.data).tag_name }}" == "${{ inputs.tag_name }}" ]]; then | ||
if [[ "${{ fromJson(steps.latest_release.outputs.data).tag_name }}" != "$CURRENT_VERSION" ]]; then | ||
echo "migrate=docs-$CURRENT_VERSION" >> $GITHUB_OUTPUT | ||
fi | ||
echo "name=docs" >> $GITHUB_OUTPUT | ||
echo "latest=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "name=docs-${{ inputs.tag_name }}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Move old latest release documentation folder | ||
if: ${{steps.folder.outputs.migrate }} | ||
run: cp -R "${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/docs/." "${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/${{ steps.folder.outputs.migrate }}" | ||
|
||
- name: Copy configuration | ||
if: ${{steps.folder.outputs.latest }} | ||
run: | | ||
cp -R ./docs/. "${{ inputs.page_dir }}${{ inputs.docs_dir }}" | ||
- name: Copy documentation folder | ||
run: | | ||
cp -R ./docs/content/en/docs/. "${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/${{ steps.folder.outputs.name}}" | ||
echo "${{ inputs.tag_name }}" > "${{ inputs.page_dir }}${{ inputs.docs_dir }}/content/en/${{ steps.folder.outputs.name}}/version" | ||
- name: Push content | ||
if: ${{ inputs.dry_run != true }} | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: github_actions | ||
cwd: ${{ inputs.page_dir }} | ||
message: "releasing documentation ${{ inputs.tag_name }}" |
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,4 +1,4 @@ | ||
.hugo_build.lock | ||
resources/_gen | ||
public | ||
go.sum | ||
node_modules |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
github_branch: main | ||
github_project_repo: https://github.com/keptn/lifecycle-toolkit | ||
github_repo: https://github.com/keptn/lifecycle-toolkit | ||
github_subdir: docs | ||
|
||
versions: | ||
- url: /docs/ | ||
version: development | ||
- url: https://lifecycle.keptn.sh | ||
version: production |
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,4 @@ | ||
versions: | ||
- url: https://dev.lifecycle-test.keptn.sh | ||
version: development | ||
github_branch: pages |
Oops, something went wrong.