update deploy
authorClaromes <claromes@hey.com>
Fri, 14 Jun 2024 10:07:32 +0000 (07:07 -0300)
committerClaromes <claromes@hey.com>
Fri, 14 Jun 2024 10:07:32 +0000 (07:07 -0300)
.github/workflows/documentation.yml

index 80927d1728f5a76d11a5c8f8e5fe2f12dea78b48..2eaf111ac1afbf05cbdc7c5409e254194b849ff9 100644 (file)
@@ -11,20 +11,21 @@ jobs:
     steps:
       - uses: actions/checkout@v4
       - uses: actions/setup-python@v5
-      - name: Install Poetry
-        run: |
-          curl -sSL https://install.python-poetry.org | python3 -
-      - name: Install dependencies
-        run: |
-          poetry install
+        with:
+          python-version: 3.11
+      - uses: abatilo/actions-poetry@v2.1.3
+      - name: install
+        run: poetry install
       - name: Sphinx build
         run: |
-          sphinx-build docs _build
-      - name: Deploy to GitHub Pages
-        uses: peaceiris/actions-gh-pages@v3
-        if: ${{ github.event_name == 'push'}}
+          mkdir gh-pages
+          touch gh-pages/.nojekyll
+          cd docs/
+          poetry run sphinx-build -b html . _build
+          cp -r _build/* ../gh-pages/
+      - name: Deploy documentation
+        if: ${{ github.event_name == 'push' }}
+        uses: JamesIves/github-pages-deploy-action@4.1.4
         with:
-          publish_branch: gh-pages
-          github_token: ${{ secrets.GITHUB_TOKEN }}
-          publish_dir: _build/
-          force_orphan: true
+          branch: gh-pages
+          folder: gh-pages