From 5457330f569cbebfc0a83fa5007b9e9d9ce9e98b Mon Sep 17 00:00:00 2001 From: nicklem Date: Wed, 22 May 2024 00:35:33 +0200 Subject: [PATCH] feat: Action --- .github/workflows/main.yml | 24 ++++++++++++++++++++++++ .github/workflows/test.yml | 20 -------------------- .gitignore | 1 + action.yml | 1 + package.json | 2 +- 5 files changed, 27 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e69de29..2e0cf0d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -0,0 +1,24 @@ +name: Read Markdown Files + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + + - name: Build the script + run: | + npm install + npm run build + + - name: Run the script + run: node dist/main.js diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 5b778d0..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Test Python Action - -on: pull_request - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Run Action - run: | - python main.py diff --git a/.gitignore b/.gitignore index ba0ca8b..2a36f8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .env .idea +dist node_modules diff --git a/action.yml b/action.yml index 889b5d9..763550a 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,6 @@ name: 'Codacy pattern documentation generator' description: 'A GitHub Action to generate Codacy pattern documentation using GPT' +author: 'Nicola Klemenc' inputs: docs_glob: description: 'Glob pattern to search for documentation files' diff --git a/package.json b/package.json index d0eb6d3..7386ad2 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "dev": "rm -rf dist && npx tsc && node dist/main.js" + "build": "rm -rf dist && npx tsc && node dist/main.js" }, "keywords": [], "author": "",