Skip to content

Merge remote-tracking branch 'origin' into IAC-737-Refactor-existing-… #37

Merge remote-tracking branch 'origin' into IAC-737-Refactor-existing-…

Merge remote-tracking branch 'origin' into IAC-737-Refactor-existing-… #37

Workflow file for this run

# @format
name: "Build MkDocs"
on:
push:
workflow_dispatch:
jobs:
mkdocs:
name: MkDocs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install MkDocs
run: |
pip install mkdocs
pip install mkdocs-material
pip install mike
pip install mkdocs-awesome-pages-plugin
pip install mkdocs-macros-plugin
pip install mkdocs-include-markdown-plugin
- name: Update Latest Release Variable
run: |
IAC_LATEST_RELEASE=$(git tag --sort=-version:refname | head -n 1 | cut -c 2-)
echo Latest Realease: $IAC_LATEST_RELEASE
yq eval ".extra.iac.latest_release = \"$IAC_LATEST_RELEASE\"" -i mkdocs.yml
- name: Build MkDocs
run: |
rm -rf testing123
mkdir testing123
mkdocs build
mv site/* testing123/
git add testing123/
git checkout mkdocs.yml
- name: Stash
run: |
git stash
- name: Checkout other branch
uses: actions/checkout@v3
with:
ref: update-docs-pages
- name: Remove Prev Version
run: |
git config --global user.email "[email protected]"
git config --global user.name "WWCoE CI admin"
rm -rf testing123
git add .
git commit --allow-empty -s -m "clean prev version"
git push
- name: Push New Version
run: |
git stash pop
git commit -s -m "add new version"
git push