Skip to content

Commit 8902a0f

Browse files
authored
Add a CD workflow for updating the reference tool (#2)
1 parent 8b3f98b commit 8902a0f

File tree

4 files changed

+53
-3
lines changed

4 files changed

+53
-3
lines changed

.github/workflows/.yamllint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
3+
extends: default
4+
ignore: |
5+
.git
6+
7+
rules:
8+
line-length: disable
9+
truthy: disable

.github/workflows/cd.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Deploy PC System Reference Tool
3+
4+
on:
5+
push:
6+
paths-ignore:
7+
- AGENTS.md
8+
- LICENSE
9+
- README.md
10+
- biome.json
11+
- global.d.ts
12+
- package-lock.json
13+
- package.json
14+
- tsconfig.json
15+
branches:
16+
- main
17+
18+
jobs:
19+
lint:
20+
uses: ./.github/workflows/lint.yml
21+
deploy:
22+
runs-on: ubuntu-latest
23+
needs: lint
24+
steps:
25+
# Load the updated code
26+
- name: Load updated code
27+
uses: appleboy/[email protected]
28+
with:
29+
host: ${{ secrets.DEPLOY_HOST }}
30+
username: ${{ secrets.DEPLOY_USERNAME }}
31+
key: ${{ secrets.DENSEBOT_PRIVATE_SSH_KEY }}
32+
script_stop: true
33+
script: cd ~/pc-system && git pull

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: Lint
3+
4+
on:
5+
pull_request:
6+
7+
jobs:
8+
lint:
9+
uses: ./.github/workflows/lint.yml

.github/workflows/lint.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
---
12
name: Lint
23

34
on:
4-
push:
5-
branches: [main]
6-
pull_request:
5+
workflow_call:
76

87
jobs:
98
lint:

0 commit comments

Comments
 (0)