Skip to content

docs: moving docs to pages #3633

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

Merged
merged 13 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .ci/terraform-init-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

# This script will run terraform init in all subdirectories of the examples directory
# required to run tflint via pre-commit

# only run the script if a uniique pid file exits if not creat it or --force flag is passed
pid="/tmp/philips-labs-terraform-aws-github-runner.pid"
if [ "$1" == "--force" ]; then
rm -f /tmp/philips-labs-terraform-aws-github-runner.pid
fi

if [ ! -f $pid ]; then
echo $$ > $pid
else
echo "Init all terraform directories will be skipped. To run the script remove the file $pid or run with --force"
exit 0
fi

# Change to the examples directory
example_dirs=$(find examples -mindepth 1 -maxdepth 2 -type d | grep -v "templates")
module_dirs=$(find modules -mindepth 1 -maxdepth 2 -type d | grep -v "templates")

# merge example_dirs and module_dirs in terraform_dirs
terraform_dirs=$(echo $example_dirs $module_dirs "modules/runners/pool" | tr " " "\n" | sort -u | tr "\n" " ")

for dir in $terraform_dirs; do
# Check if the subdirectory exists in Git
if git rev-parse --is-inside-work-tree &>/dev/null && git ls-files --error-unmatch "$dir" &>/dev/null; then
echo "Running terraform init in ${dir} - supressing output"
pushd "$dir" >/dev/null
terraform init -lockfile=readonly -backend=false &>/dev/null || true
popd >/dev/null
fi
done
25 changes: 24 additions & 1 deletion .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,32 @@ jobs:
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # ratchet:peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update Terraform docs"
commit-message: "docs: auto update terraform docs"
title: "docs: Update Terraform docs"
branch: update-docs
branch-suffix: random
base: ${{ github.event.pull_request.base.ref }}
delete-branch: true

deploy-pages:
needs: [docs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: pip install mkdocs-material-extensions
- run: mkdocs gh-deploy --force -c -b gh-pages
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ secrets.auto.tfvars
**/coverage/*

node_modules/
site/
499 changes: 50 additions & 449 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/ami-examples/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--8<-- "images/README.md"
Binary file added docs/assets/aws-architecture.dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/aws-architecture.light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading