Skip to content

Commit

Permalink
GH pages from actions instead of branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Panchenko committed Mar 1, 2024
1 parent 5ab925a commit 4623c3e
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions {{cookiecutter.project_name}}/.github/workflows/lint_and_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
permissions:
id-token: write
pages: write
steps:
- name: Cancel previous run
uses: styfle/[email protected]
Expand Down Expand Up @@ -39,18 +42,11 @@ jobs:
run: poetry run poe type-check
- name: Docs
run: poetry run poe doc-build
- name: Prepare Pages
if: github.ref == 'refs/heads/main'
run: |
mv docs/_build/* public/
- name: Deploy Pages
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/main'
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: public
TARGET_FOLDER: .
CLEAN: true
SINGLE_COMMIT: true
{%- endraw %}
path: "docs/_build"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
{%- endraw %}

0 comments on commit 4623c3e

Please sign in to comment.