mirror of
https://github.com/goreleaser/nfpm
synced 2024-05-04 06:46:07 +02:00
docs: improve build
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
023da3d4fa
commit
51aaa7d701
|
@ -10,6 +10,7 @@ on:
|
|||
- 'cmd/*'
|
||||
- 'internal/cmd/*'
|
||||
- 'files/*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
|
@ -24,6 +25,9 @@ jobs:
|
|||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- run: task docs:generate
|
||||
- run: task docs:releases
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "docs: update cmd docs"
|
||||
|
|
|
@ -11,6 +11,15 @@ permissions:
|
|||
packages: write
|
||||
|
||||
jobs:
|
||||
trigger-generate:
|
||||
runs-on: ubuntu-latest
|
||||
needs: goreleaser
|
||||
steps:
|
||||
- uses: benc-uk/workflow-dispatch@v1
|
||||
with:
|
||||
ref: main
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
workflow: generate.yml
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
|
|
|
@ -96,6 +96,13 @@ tasks:
|
|||
- www/docs/cmd/*.md
|
||||
- www/docs/contributing.md
|
||||
|
||||
docs:releases:
|
||||
desc: Generate the latest file
|
||||
cmds:
|
||||
- ./scripts/pages/releases.sh
|
||||
generates:
|
||||
- www/docs/static/latest
|
||||
|
||||
docs:imgs:
|
||||
desc: Download and resize images
|
||||
cmds:
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
set -euo pipefail
|
||||
pip install -U pip
|
||||
pip install -U mkdocs-material mkdocs-minify-plugin lunr
|
||||
version="$(curl -sSf -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/repos/goreleaser/nfpm/releases/latest" | jq -r '.tag_name')"
|
||||
version="$(cat ./www/docs/static/latest)"
|
||||
sed -s'' -i "s/__VERSION__/$version/g" www/docs/install.md
|
||||
mkdocs build -f www/mkdocs.yml
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
curl -sSf -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/repos/goreleaser/nfpm/releases/latest" |
|
||||
jq -r '.tag_name' >./www/docs/static/latest
|
|
@ -0,0 +1 @@
|
|||
v2.22.2
|
Loading…
Reference in New Issue