name: GitHub Pages on: push: branches: - main workflow_dispatch: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: "pages" cancel-in-progress: false jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install Helm uses: azure/setup-helm@v4 with: version: v3.14.0 - name: Setup Pages uses: actions/configure-pages@v5 - name: Create Helm packages directory run: mkdir -p _site - name: Package Helm chart run: | helm package charts/nuclei-operator -d _site - name: Generate Helm repo index run: | helm repo index _site --url https://morten-olsen.github.io/homelab-nuclei-operator - name: Create index.html run: | cat > _site/index.html << 'EOF' Nuclei Operator Helm Repository

🔬 Nuclei Operator Helm Repository

This is the Helm chart repository for the Nuclei Operator.

Usage

Add this repository to Helm:

helm repo add nuclei-operator https://morten-olsen.github.io/homelab-nuclei-operator
          helm repo update

Install the chart:

helm install nuclei-operator nuclei-operator/nuclei-operator \
            --namespace nuclei-operator-system \
            --create-namespace

Available Charts

Links

EOF - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: _site deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4