diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..cffc198 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @MartaSien \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3401052 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/linters/.mega-linter.yml b/.github/linters/.mega-linter.yml new file mode 100644 index 0000000..c45a956 --- /dev/null +++ b/.github/linters/.mega-linter.yml @@ -0,0 +1,16 @@ +# Configuration file for MegaLinter +# See all available variables at https://megalinter.io/configuration/ and in linters documentation +# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY +ENABLE_LINTERS: + - PYTHON_BLACK + - PYTHON_RUFF + - CSS_STYLELINT + - HTML_HTMLHINT + - MARKDOWN_MARKDOWNLINT + - YAML_PRETTIER +MARKDOWN_FILTER_REGEX_EXCLUDE: '(LICENSE\.md|docs/NEWS\.md)' +MARKDOWN_MARKDOWN_LINK_CHECK_DISABLE_ERRORS: true +PRE_COMMANDS: + - command: R --slave -e 'install.packages(c("lintr"))' + cwd: "root" +PRINT_ALL_FILES: false diff --git a/.github/workflows/megalinter.yml b/.github/workflows/megalinter.yml new file mode 100644 index 0000000..4dbceef --- /dev/null +++ b/.github/workflows/megalinter.yml @@ -0,0 +1,37 @@ +# MegaLinter GitHub Action configuration file +# More info at https://megalinter.io +name: MegaLinter + +on: + push: + branches: [master] + pull_request: + branches: [master] + +env: + MEGALINTER_CONFIG: .github/linters/.mega-linter.yml + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + megalinter: + name: MegaLinter + runs-on: ubuntu-latest + steps: + # Git Checkout + - name: Checkout Code + uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT }} + + - name: MegaLinter + id: ml + # You can override MegaLinter flavor used to have faster performances + # More info at https://megalinter.io/flavors/ + uses: oxsecurity/megalinter/flavors/python@v8.0.0 + env: + VALIDATE_ALL_CODEBASE: true + GITHUB_TOKEN: ${{ secrets.PAT }} + # DISABLE: COPYPASTE,SPELL # Uncomment to disable copy-paste and spell checks diff --git a/.github/workflows/update-website.yml b/.github/workflows/update-website.yml new file mode 100644 index 0000000..8d11de4 --- /dev/null +++ b/.github/workflows/update-website.yml @@ -0,0 +1,55 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Update website + +on: + # Runs on pushes targeting the default branch + pull_request: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "update" + cancel-in-progress: false + +jobs: + # Run Python script to fetch REST API info + update: + runs-on: ubuntu-latest + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + # Push to protected branch + token: ${{ secrets.PAT }} + # Fetch all commits instead of a single, top one + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Generate files + run: python main.py + - name: Prepare deployment branch + run: | + git stash + git checkout gh-pages + git reset --hard origin/master + git stash pop + - name: Commit and push + uses: stefanzweifel/git-auto-commit-action@v7.1.0 + with: + commit_message: Update website + push_options: --force + branch: gh-pages