-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from shner-elmo/staging
Merge staging into master
- Loading branch information
Showing
15 changed files
with
1,088 additions
and
4,372 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 |
---|---|---|
@@ -1,46 +1,41 @@ | ||
name: website | ||
|
||
# build the documentation whenever there are new commits on main | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
# security: restrict permissions for CI jobs. | ||
permissions: | ||
contents: read | ||
- staging | ||
|
||
jobs: | ||
# Build the documentation and upload the static HTML files as an artifact. | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
|
||
# install all dependencies (including pdoc) | ||
- run: curl -sSL https://install.python-poetry.org | python3 - | ||
- run: poetry install | ||
# build your documentation into docs/. | ||
- run: poetry run pdoc tradingview_screener/ -o docs/ | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref_name }} | ||
|
||
- name: Run `pdoc` on current branch `master`/`live` | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
poetry install | ||
poetry run pdoc tradingview_screener/ -o /tmp/docs -t templates/ | ||
- uses: actions/upload-pages-artifact@v1 | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: docs/ | ||
ref: docs | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
|
||
# Deploy the artifact to GitHub pages. | ||
# This is a separate job so that only actions/deploy-pages has the necessary permissions. | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v2 | ||
- name: Move generated docs from temp directory to branch `docs`, and commit (branch docs contains a folder named docs) | ||
run: | | ||
mkdir -p ./docs/latest | ||
cp -r /tmp/docs/* ./docs/latest | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git add . | ||
git status | ||
git commit -a -m "Generated docs for latest dev version" | ||
git push |
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 |
---|---|---|
|
@@ -2,3 +2,7 @@ __pycache__/ | |
.idea/ | ||
env | ||
notes.txt | ||
docs/ | ||
data/ | ||
dist/ | ||
trash/ |
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
Oops, something went wrong.