55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
name: Push documentation to Meli and run Pylint
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
setup:
|
|
runs-on: docker
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.11"]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "12"
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
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 config virtualenvs.create false
|
|
poetry install --with docs --with dev --no-root
|
|
|
|
build-documentation:
|
|
needs: setup
|
|
runs-on: docker
|
|
steps:
|
|
- name: Build the documentation
|
|
run: |
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
mkdocs build
|
|
- name: Deploy the documentation to Meli
|
|
run: |
|
|
npx -p "@getmeli/cli" meli upload ./site \
|
|
--url "http://pages.coastalcommits.com" \
|
|
--site "${{ secrets.MELI_SITE }}" \
|
|
--token "${{ secrets.MELI_SITE_SECRET }}" \
|
|
--release "$GITHUB_SHA"
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.COASTALCOMMITSTOKEN }}
|
|
|
|
pylint:
|
|
needs: setup
|
|
runs-on: docker
|
|
steps:
|
|
- 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')
|