Skip to content
name: Generate page docs
on: push
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker
run: |
cp .env.dist .env
docker-compose build
- name: Run Docker
run: |
docker-compose up -d
- name: Create docs directory if it doesn't exist
run: |
if [ ! -d "docs" ]; then
mkdir -p docs
fi
- name: Fetch page docs
run: |
until $(curl -o docs/index.html --silent --fail http://0.0.0.0:8000/api/docs); do
sleep 1
done
curl -o docs/openapi.json --silent --fail http://0.0.0.0:8000/api/openapi.json
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GH_PAT }}
# force_with_lease: true