Skip to content

Commit

Permalink
Improve github actions release perfomance
Browse files Browse the repository at this point in the history
  • Loading branch information
SupertigerDev committed Jul 13, 2023
1 parent 97af942 commit b368542
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 28 deletions.
30 changes: 4 additions & 26 deletions .github/workflows/push-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,10 @@ jobs:
run: |
npm i -g pnpm
pnpm i
- name: Build App
run: pnpm run build

- name: Zip The Build
uses: vimtor/action-zip@v1
with:
files: dist/
dest: chat-client-uwu.zip

- name: Deploy to Server
uses: marcodallasanta/[email protected]
with:
local: 'chat-client-uwu.zip'
remote: '/var/www/test.zip'
host: ${{secrets.HOST}}
user: ${{secrets.USER}}
password: ${{secrets.PASS}}

- name: unzip
uses: appleboy/[email protected]
- name: Publish Artifact
uses: actions/upload-artifact@v3
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
password: ${{ secrets.PASS }}
port: ${{ secrets.PORT }}
script: |
unzip -o /var/www/test.zip -d /var/www/test/
rm -rf /var/www/test.zip
name: my-artifact
path: dist/
15 changes: 13 additions & 2 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,23 @@ jobs:
- name: Deploy to Server
uses: marcodallasanta/[email protected]
with:
local: 'dist/' # Local file path - REQUIRED false - DEFAULT ./
remote: '/var/www/nerimity.com/' # Remote file path - REQUIRED false - DEFAULT ~/
local: 'chat-client-${{ steps.get_version.outputs.VERSION }}.zip' # Local file path - REQUIRED false - DEFAULT ./
remote: '/var/www/chat-client-${{ steps.get_version.outputs.VERSION }}.zip' # Remote file path - REQUIRED false - DEFAULT ~/
host: ${{secrets.HOST}} # Remote server address - REQUIRED true
user: ${{secrets.USER}} # Remote server user - REQUIRED true
password: ${{secrets.PASS}} # User password - REQUIRED at least one of "password" or "key"

- name: Unzip built
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
password: ${{ secrets.PASS }}
port: ${{ secrets.PORT }}
script: |
unzip -o /var/www/chat-client-${{ steps.get_version.outputs.VERSION }}.zip -d /var/www/nerimity.com/
rm -rf /var/www/chat-client-${{ steps.get_version.outputs.VERSION }}.zip
- name: Publish Draft Release
uses: "marvinpinto/action-automatic-releases@latest"
Expand Down

0 comments on commit b368542

Please sign in to comment.