diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5dc0b405..86b86e55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,6 +35,7 @@ jobs: - name: Build project # This would actually build your project, using zip for an example artifact run: | pnpm run bundle + cp -R assets out cd out zip -r ../release.zip ./* - name: Create Release @@ -72,6 +73,7 @@ jobs: script: | whoami cd - ls -a source ~/.zshrc - sh ~/mx/deploy.sh + cd mx + ls -a + sh deploy.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..d644c8ad --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +on: + push: + branches: [master] + +name: Deploy + +jobs: + deploy: + name: Deploy to server + runs-on: ubuntu-latest + steps: + - name: Exec deploy script with SSH + uses: appleboy/ssh-action@master + with: + command_timeout: 10m + host: ${{ secrets.HOST }} + username: ${{ secrets.USER }} + password: ${{ secrets.PASSWORD }} + script: | + whoami + cd + source ~/.zshrc + cd mx + ls -a + sh deploy.sh diff --git a/scripts/bundle.sh b/scripts/bundle.sh new file mode 100644 index 00000000..84386b10 --- /dev/null +++ b/scripts/bundle.sh @@ -0,0 +1,5 @@ +#!/bin/sh +pnpm run bundle +cp -R assets out +cd out +zip -r ../release.zip ./* \ No newline at end of file