SeaCogs/.forgejo/workflows/action.yaml

57 lines
1.7 KiB
YAML
Raw Normal View History

name: Push documentation to Meli and run Pylint
on: [push, pull_request]
jobs:
2024-01-06 11:25:25 -05:00
Setup:
runs-on: docker
strategy:
matrix:
python-version: ["3.11"]
2024-01-06 11:26:24 -05:00
container: catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "12"
- name: Set up Python
2024-01-06 11:25:25 -05:00
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 config virtualenvs.create false
poetry install --with docs --with dev --no-root
2024-01-06 11:25:25 -05:00
Build Documentation and push to Meli:
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 }}
2024-01-06 11:25:25 -05:00
Lint Code with 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')