From 8e47ac588331497af7d9b019cdf30a17c39b5708 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 6 Jan 2024 16:19:09 +0000 Subject: [PATCH] misc(workflows): merged workflows into a single workflow file with distinct jobs --- .forgejo/workflows/action.yaml | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .forgejo/workflows/action.yaml diff --git a/.forgejo/workflows/action.yaml b/.forgejo/workflows/action.yaml new file mode 100644 index 0000000..dbfd924 --- /dev/null +++ b/.forgejo/workflows/action.yaml @@ -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')