upd Readme #33
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
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/openapi.json --silent --fail http://0.0.0.0:8000/api/openapi.json); do | |
sleep 1 | |
done | |
curl -o docs/swagger.html --silent --fail http://0.0.0.0:8000/api/docs | |
sed 's:/api/openapi.json:openapi.json:g' docs/swagger.html > docs/index.html | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions |