-
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.
Build and deploy docs using asciidoctor with GHA
- Loading branch information
1 parent
941f6e1
commit b8dd025
Showing
1 changed file
with
62 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
name: "Build and deploy docs" | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
tags: ["*"] | ||
# FIXME: do not build docs on each PR or push | ||
pull_request: | ||
branches: ["*"] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
pages: write | ||
|
||
concurrency: | ||
cancel-in-progress: false | ||
group: "pages" | ||
|
||
jobs: | ||
build_docs: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout git repository" | ||
uses: actions/checkout@v4 | ||
- name: "Show date" | ||
run: date --iso-8601=minutes | ||
- name: "DEBUG ME docker run" | ||
run: "docker run --rm -it docker.io/library/alpine:3.19.1 uname -a" | ||
- name: "DEBUG ME docker pull" | ||
run: "docker pull ghcr.io/maximiliankolb/docs:1.0.0" | ||
- name: "Check tree" | ||
run: tree -a | ||
- name: "Workaround to use podman in Makefile" | ||
run: sed -i "s/podman/docker/g/" Makefile | ||
- name: "Workaround to use minimal container image" | ||
run: sed -i "s/docs-minimal/docs/g/" Makefile | ||
- name: "Build docs" | ||
run: make html | ||
- name: "Check tree again" | ||
run: tree -a | ||
|
||
# # copied from | ||
# deploy: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# - name: Setup Pages | ||
# uses: actions/configure-pages@v4 | ||
# - name: Upload artifact | ||
# uses: actions/upload-pages-artifact@v3 | ||
# with: | ||
# path: "docs/output/" | ||
# - name: Deploy to GitHub Pages | ||
# id: deployment | ||
# uses: actions/deploy-pages@v4 | ||
... |