From 592c83cfe20b8f93bf90c7e35fbbe490bebe5dfe Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Wed, 13 Dec 2023 16:46:44 +0100 Subject: [PATCH] Add gitea action --- .gitea/workflows/astro.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/astro.yml diff --git a/.gitea/workflows/astro.yml b/.gitea/workflows/astro.yml new file mode 100644 index 0000000..077d9bd --- /dev/null +++ b/.gitea/workflows/astro.yml @@ -0,0 +1,31 @@ +name: Deploy Astro +on: + push: + branches: + - astro + +jobs: + build-and-deploy: + name: Build and Deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + name: Checkout code + - name: Setup node and npm + uses: actions/setup-node@v3 + with: + node-version: 21 + - name: Install dependencies + run: npm ci + - name: Check and build + run: npm run build + - name: Copy files via ssh + uses: https://github.com/appleboy/scp-action@v0.1.4 + with: + host: c0ntroller.de + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_KEY }} + source: "dist/*" + target: /var/www/website/astro + overwrite: true + strip_components: 1 \ No newline at end of file