Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init antora doc #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/doc-gen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy static documentation on Pages

on:
push:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be this workflow should only be launched if /doc folder has been modified. what do you think about?

branches: ["*"]
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run Doc generation script
run: doc/generate.bash

- name: Fix permissions
run: sudo chmod -c -R +rX 'doc/docs-site/build'

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'doc/docs-site/build/site/'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
3 changes: 3 additions & 0 deletions doc/generate.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -x
set -e
# version : 0.1.0

SCRIPT=$(realpath "$0")
Expand All @@ -10,4 +12,5 @@ echo "Antora build"


docker build ${SCRIPTPATH} --no-cache -t syson_doc_generator:local

docker run -v $SCRIPTPATH/..:/usr/app syson_doc_generator:local