From a4ebb03ce76ea71fec393a0b95ed20e02f3f8436 Mon Sep 17 00:00:00 2001 From: Ben Parsons <9parsonsb@gmail.com> Date: Tue, 4 Jul 2023 13:28:21 +1000 Subject: [PATCH] update workflows --- .gitea/workflows/build.yml | 8 +++++++- .gitea/workflows/{release.yml => deploy.yml} | 17 +++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) rename .gitea/workflows/{release.yml => deploy.yml} (50%) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4a97465..a967548 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,5 +1,11 @@ name: Build -on: [push] +on: + push: + branches: + - master + pull_request: + branches: + - master runs-on: ubuntu-latest diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/deploy.yml similarity index 50% rename from .gitea/workflows/release.yml rename to .gitea/workflows/deploy.yml index d2aa0d5..b4efe91 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/deploy.yml @@ -1,13 +1,15 @@ -name: Build +name: Deploy + on: push: tags: - '*' -runs-on: ubuntu-latest +runs-on: ubuntu-latest:host jobs: - build: + deploy: + needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -19,8 +21,7 @@ jobs: run: npm run check - name: ๐Ÿ”จ Build project run: npm run build - - name: ๐Ÿ“ฆ Zip project - run: tar -czf build.zip build - - name: โ˜๏ธ Upload artifact - run: | - curl -T build.zip -H 'Authorization: token ${{ secrets.PACKAGE_TOKEN }}' 'https://minijack@git.quartznet.info/api/packages/quartznet/generic/quartznet/${{ gitea.ref }}/quartznet-${{ gitea.ref }}.zip' + - name: ๐Ÿงน Clean Deploy Area + run: rm -rf /www/svelte/build + - name: ๐Ÿ“ฆ Deploy + run: mv build /www/svelte/