diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f887741 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,39 @@ +name: deploy +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: setup pnpm + uses: pnpm/action-setup@v2 + with: + version: latest + + - name: setup node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: pnpm + + - name: install deps + run: pnpm i + + - name: build the app + run: pnpm build + + - name: copy repo with scp + uses: appleboy/scp-action@v0.1.4 + with: + host: ${{ secrets.HOST }} + port: ${{ secrets.PORT }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + source: "./dist/" + target: "/home/artem/artie.moe/" diff --git a/deploy.sh b/deploy.sh deleted file mode 100644 index a7c892b..0000000 --- a/deploy.sh +++ /dev/null @@ -1 +0,0 @@ -rsync -avzh --delete dist/ artem@shironeko:~/artie.moe/public/ \ No newline at end of file diff --git a/package.json b/package.json index 60b1606..f5c3925 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,7 @@ "start": "astro dev", "build": "astro build", "preview": "astro preview", - "astro": "astro", - "push": "pnpm build && wsl ./deploy.sh" + "astro": "astro" }, "dependencies": { "@astrojs/svelte": "^2.1.0",