Skip to content

Commit f85efef

Browse files
committed
fix: remove use artifact
Signed-off-by: Innei <i@innei.in>
1 parent b1d22b5 commit f85efef

File tree

1 file changed

+12
-28
lines changed

1 file changed

+12
-28
lines changed

.github/workflows/deploy.yml

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
echo "Hashes do not match. Continuing workflow."
6767
fi
6868
69-
build:
69+
build-and-deploy:
7070
name: Build artifact
7171
runs-on: ubuntu-latest
7272
needs: check
@@ -102,31 +102,6 @@ jobs:
102102
run: |
103103
sh ./ci-release-build.sh
104104
105-
- uses: actions/upload-artifact@v4
106-
with:
107-
name: dist
108-
path: assets/release.zip
109-
retention-days: 7
110-
111-
- name: Store artifact commit version
112-
shell: bash
113-
id: store
114-
run: |
115-
sha_short=$(git rev-parse --short HEAD)
116-
branch_name=$(git rev-parse --abbrev-ref HEAD)
117-
echo "sha_short=$sha_short" >> "$GITHUB_OUTPUT"
118-
echo "branch=$branch_name" >> "$GITHUB_OUTPUT"
119-
120-
deploy:
121-
name: Deploy artifact
122-
runs-on: ubuntu-latest
123-
needs: build
124-
steps:
125-
- name: Download artifact
126-
uses: actions/download-artifact@v4
127-
with:
128-
name: dist
129-
130105
- name: copy file via ssh password
131106
uses: appleboy/scp-action@v0.1.7
132107
with:
@@ -135,7 +110,7 @@ jobs:
135110
password: ${{ secrets.PASSWORD }}
136111
key: ${{ secrets.KEY }}
137112
port: ${{ secrets.PORT }}
138-
source: 'release.zip'
113+
source: 'assets/release.zip'
139114
target: '/tmp/shiro'
140115

141116
- name: Exec deploy script with SSH
@@ -168,10 +143,19 @@ jobs:
168143
pm2 save
169144
echo "Deployed successfully"
170145
146+
- name: Store artifact commit version
147+
shell: bash
148+
id: store
149+
run: |
150+
sha_short=$(git rev-parse --short HEAD)
151+
branch_name=$(git rev-parse --abbrev-ref HEAD)
152+
echo "sha_short=$sha_short" >> "$GITHUB_OUTPUT"
153+
echo "branch=$branch_name" >> "$GITHUB_OUTPUT"
154+
171155
store:
172156
name: Store artifact commit version
173157
runs-on: ubuntu-latest
174-
needs: [deploy, build]
158+
needs: [build-and-deploy]
175159
steps:
176160
- name: Checkout
177161
uses: actions/checkout@v4

0 commit comments

Comments
 (0)