🔥 (porfolio): Remove chart #664
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
name: Release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
concurrency: | |
group: release | |
cancel-in-progress: false | |
jobs: | |
release-charts: | |
name: Release Charts | |
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 "$GITHUB_ACTOR@users.noreply.github.com" | |
- name: Add bitnami charts | |
run: | | |
helm repo add bitnami https://charts.bitnami.com/bitnami | |
- name: Add bjw-s charts | |
run: | | |
helm repo add bjw-s https://bjw-s.github.io/helm-charts | |
- name: Remove readme images | |
run: | | |
set -x | |
for f in charts/**/README.md; do | |
sed -i '/^<img .* alt=".* logo"/,+1d' "$f" | |
done | |
- name: Run chart-releaser | |
uses: helm/chart-releaser-action@v1.5.0 | |
env: | |
CR_TOKEN: "${{ github.token }}" | |
CR_SKIP_EXISTING: "true" | |
CR_PAGES_BRANCH: helm-index | |
build-docs: | |
name: Build Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
cache: pip | |
cache-dependency-path: docs/requirements.txt | |
- name: MkDocs cache | |
uses: actions/cache@v3 | |
with: | |
path: docs/.cache | |
key: ${{ runner.os }}-mkdocs-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-mkdocs- | |
- name: Install dependencies | |
run: pip install -r docs/requirements.txt | |
- name: Build docs | |
working-directory: docs | |
env: | |
REPO_NAME: ${{ github.repository }} | |
REPO_URL: ${{ github.server_url }}/${{ github.repository }} | |
run: mkdocs build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: docs/site | |
deploy-site: | |
name: Deploy Site | |
runs-on: ubuntu-latest | |
needs: [release-charts, build-docs] | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout Helm index | |
uses: actions/checkout@v3 | |
with: | |
path: helm-index | |
ref: refs/heads/helm-index | |
- name: Download docs artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: docs | |
path: docs | |
- name: Move Helm index to docs | |
run: mv helm-index/* docs | |
- name: Upload release artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: docs | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |