diff --git a/.github/workflows/.yamllint.yml b/.github/workflows/.yamllint.yml new file mode 100644 index 0000000..b1b08b6 --- /dev/null +++ b/.github/workflows/.yamllint.yml @@ -0,0 +1,9 @@ +--- + +extends: default +ignore: | + .git + +rules: + line-length: disable + truthy: disable diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..34ebcc5 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,33 @@ +--- +name: Deploy PC System Reference Tool + +on: + push: + paths-ignore: + - AGENTS.md + - LICENSE + - README.md + - biome.json + - global.d.ts + - package-lock.json + - package.json + - tsconfig.json + branches: + - main + +jobs: + lint: + uses: ./.github/workflows/lint.yml + deploy: + runs-on: ubuntu-latest + needs: lint + steps: + # Load the updated code + - name: Load updated code + uses: appleboy/ssh-action@v1.0.0 + with: + host: ${{ secrets.DEPLOY_HOST }} + username: ${{ secrets.DEPLOY_USERNAME }} + key: ${{ secrets.DENSEBOT_PRIVATE_SSH_KEY }} + script_stop: true + script: cd ~/pc-system && git pull diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6a323f9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,9 @@ +--- +name: Lint + +on: + pull_request: + +jobs: + lint: + uses: ./.github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 503161f..8765fa1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,9 +1,8 @@ +--- name: Lint on: - push: - branches: [main] - pull_request: + workflow_call: jobs: lint: