diff --git a/.gitea/workflows/build-action.yaml b/.gitea/workflows/build-action.yaml index 830c396c..5f19e422 100644 --- a/.gitea/workflows/build-action.yaml +++ b/.gitea/workflows/build-action.yaml @@ -1,19 +1,68 @@ -name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: [push] +name: Frontend CI/CD + +on: + push: + branches: + - main + - test jobs: - Explore-Gitea-Actions: - runs-on: ps-plrl + build: + runs-on: ubuntu-latest + strategy: + matrix: + project: [web-office] + steps: - - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - name: Check out repository code - uses: actions/checkout@v3 - - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository + + # Output Node.js and npm version + - name: Output Node.js and npm version run: | - ls ${{ gitea.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." + echo "Node.js version:" + node -v + echo "npm version:" + npm -v + corepack enable + corepack prepare pnpm@latest-9 --activate + pnpm config set store-dir .pnpm-store + echo "pnpm version:" + pnpm -v + + # Clone repository + - name: Clone repository + uses: https://gitea.com/actions/checkout@v4 + + # Cache pnpm dependencies + - name: Cache pnpm store + uses: https://gitea.com/actions/cache@v3 + id: pnpm-cache + with: + path: .pnpm-store + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + # Install dependencies and build + - name: Install dependencies and build + run: | + ls + echo "Installing dependencies..." + pnpm install --no-frozen-lockfile + echo "Dependencies installed." + echo "Building project..." + pnpm build --filter ${{ matrix.project }} + echo "Project built." + + # Transfer files to target server + - name: Transfer files to target server + run: | + echo "Transferring files..." + mkdir -p ~/.ssh + echo "${{ vars.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + cd apps/web-office + echo "Local files in the directory:" + ls + rsync -av --delete -e "ssh -o StrictHostKeyChecking=no -p ${{ vars.REMOTE_PORT }}" dist/ ${{ vars.REMOTE_USER }}@${{ vars.REMOTE_HOST }}:/opt/test + echo "Files transferred." + \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 3b7f8187..00000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,14 +0,0 @@ -# default onwer -* anncwb@126.com vince292007@gmail.com - -# vben core onwer -/.github/ anncwb@126.com vince292007@gmail.com -/.vscode/ anncwb@126.com vince292007@gmail.com -/packages/ anncwb@126.com vince292007@gmail.com -/packages/@core/ anncwb@126.com vince292007@gmail.com -/internal/ anncwb@126.com vince292007@gmail.com -/scripts/ anncwb@126.com vince292007@gmail.com - -# vben team onwer -apps/ anncwb@126.com vince292007@gmail.com @vbenjs/team-v5 -docs/ anncwb@126.com vince292007@gmail.com @vbenjs/team-v5 diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml deleted file mode 100644 index 10fc939e..00000000 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: 🐞 Bug Report -description: Report an issue with Vben Admin to help us make it better. -title: "Bug: " -labels: ["bug: pending triage"] - -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! - - type: dropdown - id: version - attributes: - label: Version - description: What version of our software are you running? - options: - - Vben Admin V5 - - Vben Admin V2 - default: 0 - validations: - required: true - - - type: textarea - id: bug-desc - attributes: - label: Describe the bug? - description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks! - placeholder: Bug Description - validations: - required: true - - - type: textarea - id: reproduction - attributes: - label: Reproduction - description: Please provide a link to [StackBlitz](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/basic?initialPath=__vitest__/) (you can also use [examples](https://github.com/vitest-dev/vitest/tree/main/examples)) or a github repo that can reproduce the problem you ran into. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required unless you are absolutely sure that the issue is obvious and the provided information is enough to understand the problem. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "needs reproduction" label. If no reproduction is provided after 3 days, it will be auto-closed. - placeholder: Reproduction - validations: - required: true - - - type: textarea - id: system-info - attributes: - label: System Info - description: Output of `npx envinfo --system --npmPackages '{vue}' --binaries --browsers` - render: shell - placeholder: System, Binaries, Browsers - validations: - required: true - - - type: textarea - id: logs - attributes: - label: Relevant log output - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - render: shell - - - type: checkboxes - id: terms - attributes: - label: Validations - description: Before submitting the issue, please make sure you do the following - # description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com). - options: - - label: Read the [docs](https://anncwb.github.io/vue-vben-admin-doc/) - required: true - - label: Ensure the code is up to date. (Some issues have been fixed in the latest version) - required: true - - label: I have searched the [existing issues](https://github.com/vbenjs/vue-vben-admin/issues) and checked that my issue does not duplicate any existing issues. - required: true - - label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vbenjs/vue-vben-admin/discussions) or join our [Discord Chat Server](https://discord.gg/8GuAdwDhj6). - required: true - - label: The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug. - required: true diff --git a/.github/ISSUE_TEMPLATE/docs.yml b/.github/ISSUE_TEMPLATE/docs.yml deleted file mode 100644 index de5e6f60..00000000 --- a/.github/ISSUE_TEMPLATE/docs.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: 📚 Documentation -description: Report an issue with Vben Admin Website to help us make it better. -title: "Docs: " -labels: [documentation] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this issue! - - type: checkboxes - id: documentation_is - attributes: - label: Documentation is - options: - - label: Missing - - label: Outdated - - label: Confusing - - label: Not sure? - - type: textarea - id: description - attributes: - label: Explain in Detail - description: A clear and concise description of your suggestion. If you intend to submit a PR for this issue, tell us in the description. Thanks! - placeholder: The description of ... page is not clear. I thought it meant ... but it wasn't. - validations: - required: true - - type: textarea - id: suggestion - attributes: - label: Your Suggestion for Changes - validations: - required: true - - type: textarea - id: reproduction-steps - attributes: - label: Steps to reproduce - description: Please provide any reproduction steps that may need to be described. E.g. if it happens only when running the dev or build script make sure it's clear which one to use. - placeholder: Run `pnpm install` followed by `pnpm run docs:dev` diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml deleted file mode 100644 index 6ad67a6f..00000000 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: ✨ New Feature Proposal -description: Propose a new feature to be added to Vben Admin -title: "FEATURE: " -labels: ["enhancement: pending triage"] -body: - - type: markdown - attributes: - value: | - Thank you for suggesting a feature for our project! Please fill out the information below to help us understand and implement your request! - - type: dropdown - id: version - attributes: - label: Version - description: What version of our software are you running? - options: - - Vben Admin V5 - - Vben Admin V2 - default: 0 - validations: - required: true - - - type: textarea - id: description - attributes: - label: Description - description: A detailed description of the feature request. - placeholder: Please describe the feature you would like to see, and why it would be useful. - validations: - required: true - - - type: textarea - id: proposed-solution - attributes: - label: Proposed Solution - description: A clear and concise description of what you want to happen. - placeholder: Describe the solution you'd like to see - validations: - required: true - - - type: textarea - id: alternatives - attributes: - label: Alternatives Considered - description: | - A clear and concise description of any alternative solutions or features you've considered. - placeholder: Describe any alternative solutions or features you've considered - validations: - required: false - - - type: input - id: additional-context - attributes: - label: Additional Context - description: Add any other context or screenshots about the feature request here. - placeholder: Any additional information - validations: - required: false - - - type: checkboxes - id: checkboxes - attributes: - label: Validations - description: Before submitting the issue, please make sure you do the following - options: - - label: Read the [docs](https://anncwb.github.io/vue-vben-admin-doc/) - required: true - - label: Ensure the code is up to date. (Some issues have been fixed in the latest version) - required: true - - label: I have searched the [existing issues](https://github.com/vbenjs/vue-vben-admin/issues) and checked that my issue does not duplicate any existing issues. - required: true diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml deleted file mode 100644 index d21c1427..00000000 --- a/.github/actions/setup-node/action.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: "Setup Node" - -description: "Setup node and pnpm" - -runs: - using: "composite" - steps: - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version-file: .node-version - cache: "pnpm" - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - if: ${{ github.ref_name == 'main' }} - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - uses: actions/cache/restore@v4 - if: ${{ github.ref_name != 'main' }} - with: - path: ${{ env.STORE_PATH }} - key: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - shell: bash - run: pnpm install --frozen-lockfile diff --git a/.github/commit-convention.md b/.github/commit-convention.md deleted file mode 100644 index a1a969e9..00000000 --- a/.github/commit-convention.md +++ /dev/null @@ -1,89 +0,0 @@ -## Git Commit Message Convention - -> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). - -#### TL;DR: - -Messages must be matched by the following regex: - -```js -/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|wip): .{1,50}/; -``` - -#### Examples - -Appears under "Features" header, `dev` subheader: - -``` -feat(dev): add 'comments' option -``` - -Appears under "Bug Fixes" header, `dev` subheader, with a link to issue #28: - -``` -fix(dev): fix dev error - -close #28 -``` - -Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: - -``` -perf(build): remove 'foo' option - -BREAKING CHANGE: The 'foo' option has been removed. -``` - -The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. - -``` -revert: feat(compiler): add 'comments' option - -This reverts commit 667ecc1654a317a13331b17617d973392f415f02. -``` - -### Full Message Format - -A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: - -``` -(): - - - -