-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH pages from actions instead of branch
- Loading branch information
Michael Panchenko
committed
Mar 1, 2024
1 parent
5ab925a
commit 4623c3e
Showing
1 changed file
with
10 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
@@ -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 %} |