From 6d4854eb207b6aed57381bc7e22fcb378813903c Mon Sep 17 00:00:00 2001 From: Eros Taborelli Date: Tue, 18 Nov 2025 13:33:05 +0100 Subject: [PATCH 1/3] feat(ci): Add pipelines --- .github/workflows/ci.yml | 34 ++++++++++++++++ .github/workflows/deploy.yml | 56 ++++++++++++++++++++++++++ .github/workflows/version-bump.yml | 64 ++++++++++++++++++++++++++++++ README.md | 10 +++++ mise.toml | 1 - package.json | 2 +- 6 files changed, 165 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/version-bump.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bf71fb9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: Continuous Integration + +on: + push: + branches-ignore: + - main + pull_request: + branches: + - main + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '24' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run linter + run: npm run lint + + - name: Run tests + run: npm test + + - name: Build project + run: npm run build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f49be1a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,56 @@ +name: Build and Deploy to GitHub Pages + +on: + push: + branches: + - main + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# 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: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '24' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test + + - name: Build project + run: npm run build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./dist + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml new file mode 100644 index 0000000..2373323 --- /dev/null +++ b/.github/workflows/version-bump.yml @@ -0,0 +1,64 @@ +name: Version Bump + +on: + workflow_run: + workflows: ["Build and Deploy to GitHub Pages"] + types: + - completed + +permissions: + contents: write + pull-requests: write + +jobs: + version-bump: + runs-on: ubuntu-latest + # Only run if the previous workflow succeeded + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Create version bump branch + run: | + BRANCH_NAME="version-bump-$(date +%Y%m%d-%H%M%S)" + git checkout -b $BRANCH_NAME + echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV + + - name: Bump version + run: npm version minor --no-git-tag-version + + - name: Commit version bump + run: | + git add package.json package-lock.json + NEW_VERSION=$(node -p "require('./package.json').version") + git commit -m "chore: bump version to $NEW_VERSION" + echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV + + - name: Push changes + run: git push origin $BRANCH_NAME + + - name: Create Pull Request + env: + GH_TOKEN: ${{ github.token }} + run: | + gh pr create \ + --title "chore: bump version to $NEW_VERSION" \ + --body "Automated version bump to \`$NEW_VERSION\` after successful deployment. + + This PR was automatically created by the version-bump workflow." \ + --base main \ + --head $BRANCH_NAME diff --git a/README.md b/README.md index 08a5c5e..b5c805a 100644 --- a/README.md +++ b/README.md @@ -72,5 +72,15 @@ npm run lint:fix npm run format ``` +## CI/CD + +This project uses GitHub Actions for continuous integration and deployment: + +### Automated Workflows + +- **CI**: Runs linter, tests, and build on all non-main branches and pull requests +- **Build and Deploy**: Automatically builds and deploys to GitHub Pages on every tag +- **Version Bump**: Creates a PR with a minor version bump after successful deployment + ## AI Disclaimer AI tools have been used to contribute to this project. diff --git a/mise.toml b/mise.toml index 671b34e..5668001 100644 --- a/mise.toml +++ b/mise.toml @@ -1,3 +1,2 @@ [tools] node = "24.9.0" -docker-cli = "28.5.0" diff --git a/package.json b/package.json index 28d40f3..19b822f 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "test:watch": "vitest watch", "test:ui": "vitest --ui", "test:coverage": "vitest --coverage", - "lint": "eslint .", + "lint": "eslint . --max-warnings=0", "lint:fix": "eslint . --fix", "format": "prettier --write \"src/**/*.{js,css,html}\"" }, From 4e05a7395c5e65e0a21f00458fa4373a9e2a986b Mon Sep 17 00:00:00 2001 From: Eros Taborelli Date: Tue, 18 Nov 2025 13:38:00 +0100 Subject: [PATCH 2/3] fix(import): Fix case sensitive import statement --- src/components/layout/ActionBar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/layout/ActionBar.vue b/src/components/layout/ActionBar.vue index b50bac9..943df4a 100644 --- a/src/components/layout/ActionBar.vue +++ b/src/components/layout/ActionBar.vue @@ -46,7 +46,7 @@