Skip to content

Merge pull request #6 from dyllamt/feature/helm-docs #2

Merge pull request #6 from dyllamt/feature/helm-docs

Merge pull request #6 from dyllamt/feature/helm-docs #2

name: Release Artifacts
on:
push:
branches:
- main
jobs:
helm-release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Release Helm Charts
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
helm-docs:
needs: helm-release
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: 'main'
- name: Generate Documentation
run: |
curl -sL https://github.com/norwoodj/helm-docs/releases/latest/download/helm-docs_linux_amd64.tar.gz | tar -xz
sudo mv helm-docs /usr/local/bin/helm-docs
cd charts
for d in */ ; do
helm-docs -c $d
done
- name: Checkout gh-pages Branch
uses: actions/checkout@v3
with:
ref: 'gh-pages'
path: 'gh-pages'
- name: Copy Documentation to gh-pages
run: |
cp -r charts/*/README.md gh-pages/
- name: Commit and Push Changes to gh-pages
run: |
cd gh-pages
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add .
git commit -m "Update documentation" -a || echo "No changes to commit"
git push origin gh-pages