feat(docs): moved to CoastalCommits pages
This commit is contained in:
parent
292911df8b
commit
35937b63ef
4 changed files with 66 additions and 53 deletions
|
@ -1,28 +0,0 @@
|
||||||
name: Pylint
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
Pylint:
|
|
||||||
runs-on: docker
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version: ["3.12"]
|
|
||||||
container: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3.6.0
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
- name: Install Poetry
|
|
||||||
run: curl -sSL https://cdn.seaswimmer.cc/go/poetry | python${{ matrix.python-version }} -
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
|
||||||
poetry env use ${{ matrix.python-version }}
|
|
||||||
poetry install --with dev
|
|
||||||
- name: Analysing the code with Pylint
|
|
||||||
run: |
|
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
|
||||||
poetry run pylint --rcfile .forgejo/workflows/config/.pylintrc $(git ls-files '*.py')
|
|
64
.forgejo/workflows/workflow.yaml
Normal file
64
.forgejo/workflows/workflow.yaml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
name: Actions
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Lint Code (Pylint):
|
||||||
|
runs-on: docker
|
||||||
|
container: coastalcommits.com/seaswimmerthefsh/actionscontainers-pyzipline:latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: poetry install --with dev --no-root
|
||||||
|
|
||||||
|
- name: Analysing code with Pylint
|
||||||
|
run: pylint --rcfile .forgejo/workflows/config/.pylintrc $(git ls-files '*.py')
|
||||||
|
|
||||||
|
Build Documentation (MkDocs):
|
||||||
|
runs-on: docker
|
||||||
|
container: coastalcommits.com/seaswimmerthefsh/actionscontainers-pyzipline:latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: poetry install --with docs --no-root
|
||||||
|
|
||||||
|
- name: Set environment variables
|
||||||
|
uses: actions/env@v2
|
||||||
|
|
||||||
|
- name: Build documentation
|
||||||
|
run: |
|
||||||
|
export SITE_URL="https://$CI_ACTION_REF_NAME_SLUG.pyzipline.coastalcommits.com"
|
||||||
|
export EDIT_URI="src/branch/$CI_ACTION_REF_NAME/docs"
|
||||||
|
mkdocs build -v
|
||||||
|
|
||||||
|
- name: Deploy documentation
|
||||||
|
run: |
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
YELLOW='\033[0;33m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
|
||||||
|
unset GITHUB_TOKEN
|
||||||
|
unset GITLAB_TOKEN
|
||||||
|
|
||||||
|
echo "${YELLOW}Deploying to ${BLUE}Meli ${YELLOW}on branch ${GREEN}$CI_ACTION_REF_NAME_SLUG${YELLOW}...\n"
|
||||||
|
|
||||||
|
npx -p "@getmeli/cli" meli upload ./site \
|
||||||
|
--url "https://pages.coastalcommits.com" \
|
||||||
|
--site "${{ vars.MELI_SITE_ID }}" \
|
||||||
|
--token "${{ secrets.MELI_SITE_SECRET }}" \
|
||||||
|
--release "$CI_ACTION_REF_NAME_SLUG/${{ env.GITHUB_SHA }}" \
|
||||||
|
--branch "$CI_ACTION_REF_NAME_SLUG"
|
||||||
|
|
||||||
|
echo "\n${YELLOW}Deployed to ${BLUE}Meli ${YELLOW}on branch ${GREEN}$CI_ACTION_REF_NAME_SLUG${YELLOW}!"
|
||||||
|
echo "${GREEN}https://$CI_ACTION_REF_NAME_SLUG.pyzipline.coastalcommits.com/"
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.COASTALCOMMITSTOKEN }}
|
|
@ -1,23 +0,0 @@
|
||||||
version: 2
|
|
||||||
|
|
||||||
build:
|
|
||||||
os: "ubuntu-22.04"
|
|
||||||
apt_packages:
|
|
||||||
- libcairo2-dev
|
|
||||||
- libfreetype6-dev
|
|
||||||
- libffi-dev
|
|
||||||
- libjpeg-dev
|
|
||||||
- libpng-dev
|
|
||||||
- libz-dev
|
|
||||||
- pngquant
|
|
||||||
tools:
|
|
||||||
python: "3.12"
|
|
||||||
jobs:
|
|
||||||
post_create_environment:
|
|
||||||
- pip install poetry
|
|
||||||
- poetry config virtualenvs.create false
|
|
||||||
post_install:
|
|
||||||
- poetry install --with docs
|
|
||||||
|
|
||||||
mkdocs:
|
|
||||||
configuration: mkdocs.yml
|
|
|
@ -1,8 +1,8 @@
|
||||||
site_name: PyZipline Documentation
|
site_name: PyZipline Documentation
|
||||||
site_url: https://pyzipline.readthedocs.io
|
site_url: !ENV SITE_URL
|
||||||
repo_name: CoastalCommits
|
repo_name: CoastalCommits
|
||||||
repo_url: https://coastalcommits.com/SeaswimmerTheFsh/PyZipline
|
repo_url: https://coastalcommits.com/SeaswimmerTheFsh/PyZipline
|
||||||
edit_uri: src/branch/main/docs
|
edit_uri: !ENV EDIT_URI
|
||||||
copyright: Copyright © 2023, SeaswimmerTheFsh
|
copyright: Copyright © 2023, SeaswimmerTheFsh
|
||||||
|
|
||||||
site_author: SeaswimmerTheFsh
|
site_author: SeaswimmerTheFsh
|
||||||
|
|
Loading…
Reference in a new issue