misc(workflows): merged workflows into a single workflow file with distinct jobs
This commit is contained in:
parent
63a204cf2b
commit
8e47ac5883
1 changed files with 51 additions and 0 deletions
51
.forgejo/workflows/action.yaml
Normal file
51
.forgejo/workflows/action.yaml
Normal file
|
@ -0,0 +1,51 @@
|
|||
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@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
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: ubuntu-latest
|
||||
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')
|
Loading…
Reference in a new issue