forked from bunkerity/bunkerweb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use proper links in docs, automatic doc push and add pdf to releases
- Loading branch information
1 parent
08e1d15
commit ad16067
Showing
27 changed files
with
568 additions
and
348 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Generate documentation PDF (REUSABLE) | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
VERSION: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Prepare | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install doc requirements | ||
run: pip install -r docs/requirements.txt | ||
- name: Install chromium | ||
uses: apt install chromium-browser | ||
- name: Install node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install puppeteer | ||
run: npm i --save puppeteer | ||
- name: Run mkdocs serve in background | ||
run: mkdocs serve & sleep 10 | ||
- name: Run pdf script | ||
run: node docs/misc/pdf.js http://localhost:8000/print_page/ BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf 'BunkerWeb documentation v${{ inputs.VERSION }}' | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf | ||
path: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Push documentation (REUSABLE) | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
VERSION: | ||
required: true | ||
type: string | ||
ALIAS: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install doc requirements | ||
run: pip install -r docs/requirements.txt | ||
- name: Push doc | ||
run: mike deploy --update-aliases --push ${{ inputs.VERSION }} ${{ inputs.ALIAS }} | ||
- name: Set default doc | ||
if: inputs.ALIAS == 'latest' | ||
run: mike set-default --push latest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Push on GitHub (REUSABLE) | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
VERSION: | ||
required: true | ||
type: string | ||
PRERELEASE: | ||
required: true | ||
type: boolean | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout | ||
- uses: actions/checkout@v3 | ||
# Get PDF doc | ||
- name: Get documentation | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf | ||
path: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf | ||
# Create tag | ||
- uses: rickstaa/action-create-tag@v1 | ||
name: Create tag | ||
with: | ||
tag: "v${{ inputs.VERSION }}" | ||
message: "v${{ inputs.VERSION }}" | ||
# Extract changelog | ||
- name: Extract changelog | ||
id: getchangelog | ||
run: echo "::set-output name=content::$(awk -v n=2 '/##/{n--}; n > 0' CHANGELOG.md | grep -v '# Changelog' | grep -v '##' | sed '/^$/d')" | ||
# Create release | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body: | | ||
Documentation : https://docs.bunkerweb.io/${{ inputs.VERSION }}/ | ||
Docker tags : | ||
- `bunkerity/bunkerweb:${{ inputs.VERSION }}` | ||
- `bunkerity/bunkerweb-scheduler:${{ inputs.VERSION }}` | ||
- `bunkerity/bunkerweb-autoconf:${{ inputs.VERSION }}` | ||
- `bunkerity/bunkerweb-ui:${{ inputs.VERSION }}` | ||
Linux packages : https://packagecloud.io/app/bunkerity/bunkerweb/search?q=${{ inputs.VERSION }}&filter=all&dist= | ||
Changelog : | ||
${{steps.getchangelog.outputs.content}} | ||
draft: false | ||
prerelease: ${{ inputs.PRERELEASE }} | ||
name: v${{ inputs.VERSION }} | ||
tag_name: v${{ inputs.VERSION }} | ||
discussion_category_name: Announcements | ||
|
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
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
Oops, something went wrong.