-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: cleanup the precommit and codes #17
Merged
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4e012d4
fix: update the files for ceanup
Revathyvenugopal162 a18db3d
fix: update the linkchcek
Revathyvenugopal162 c88cf69
fix: update the actions
Revathyvenugopal162 792e901
fix: update the mail
Revathyvenugopal162 32da199
fix: update the artifacts
Revathyvenugopal162 ad9e993
fix: update the artifacts actions
Revathyvenugopal162 4421af5
fix: deploy to gh pages
Revathyvenugopal162 c3d9d2e
fix: deploy to gh pages without conditional
Revathyvenugopal162 e160c74
fix: deploy to gh pages without conditional
Revathyvenugopal162 f0158cb
test:deploy to github
Revathyvenugopal162 ba5ddfb
test: deploy to github
Revathyvenugopal162 42415ff
test: deploy to github with permissions
Revathyvenugopal162 f0aad3d
fix: merge main
Revathyvenugopal162 4b020e0
fix: merge main
Revathyvenugopal162 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -6,10 +6,15 @@ on: | |
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
# This job installs dependencies, build the book, and pushes it to `gh-pages` | ||
jobs: | ||
build-test-book: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -38,16 +43,9 @@ jobs: | |
run: python3 -m pip install nox | ||
|
||
- name: Build book | ||
run: nox -s docs | ||
|
||
# Push the book's HTML to github-pages | ||
- name: Push to GitHub Pages | ||
# Only push if on main branch | ||
if: github.ref == 'refs/heads/main' | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: "./_build/html" | ||
run: | | ||
nox -s linkcheck | ||
nox -s docs-test | ||
|
||
# Test for bad links and ensure alt tags for usability | ||
- name: Check HTML using htmlproofer | ||
|
@@ -66,3 +64,43 @@ jobs: | |
name: book-html | ||
path: | | ||
./_build/html | ||
|
||
- name: Deploy to gh pages | ||
# if: github.ref == 'refs/heads/main' | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./_build/html | ||
keep_files: true | ||
commit_message: "Deploy to GitHub Pages" | ||
publish_branch: gh-pages | ||
|
||
# This job installs dependencies, build the project, and uploads the artifact | ||
build-artifact: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
cache: "pip" | ||
cache-dependency-path: pyproject.toml | ||
|
||
- name: Upgrade pip | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
|
||
- name: Install dependencies | ||
run: python3 -m pip install nox | ||
|
||
- name: Build project | ||
run: nox -s build-project | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pyos-sphinx-theme-artifact | ||
path: dist/ | ||
retention-days: 7 |
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
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
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
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
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 |
---|---|---|
|
@@ -28,9 +28,6 @@ dependencies = [ | |
] | ||
|
||
license = { file = "LICENSE"} | ||
authors = [ | ||
{name = "pyos", email = "[email protected]"}, | ||
] | ||
classifiers = [ | ||
"Framework :: Sphinx", | ||
"Framework :: Sphinx :: Theme", | ||
|
@@ -59,3 +56,19 @@ docs = [ | |
|
||
[project.entry-points."sphinx.html_themes"] | ||
"pyos_sphinx_theme" = "pyos_sphinx_theme" | ||
|
||
[tool.ruff] | ||
line-length = 100 | ||
select = [ | ||
"E", # pycodestyle, see https://beta.ruff.rs/docs/rules/#pycodestyle-e-w | ||
"D", # pydocstyle, see https://beta.ruff.rs/docs/rules/#pydocstyle-d | ||
"F", # pyflakes, see https://beta.ruff.rs/docs/rules/#pyflakes-f | ||
"I", # isort, see https://beta.ruff.rs/docs/rules/#isort-i | ||
"N", # pep8-naming, see https://beta.ruff.rs/docs/rules/#pep8-naming-n | ||
] | ||
[tool.ruff.format] | ||
quote-style = "double" | ||
|
||
[tool.ruff.lint.isort] | ||
combine-as-imports = true | ||
force-sort-within-sections = true |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Revathyvenugopal162 this looks good. I think we want to use the new deploy to GitHub pages that we are using in our website repo here
Are you open to modifying this to use deploy to GH pages rather than the peaceiris action instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lwasser ,sure, i can revert to that change.