fix dockerfile #4
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: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Docker image | |
run: | | |
cp .env.dist .env | |
docker-compose build | |
- name: Run FastAPI in Docker | |
run: | | |
docker-compose up -d | |
sleep 5 | |
- name: Fetch /docs page | |
run: | | |
docker-compose exec backend curl http://0.0.0.0:8000/api/docs -o index.html | |
- name: Commit index.html | |
run: | | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email '<>' | |
git add index.html | |
git commit -m "Update docs page" || exit 0 | |
git push |