diff --git a/.gitea/workflows/cicd.yaml b/.gitea/workflows/cicd.yaml index bcde467..54b60b7 100644 --- a/.gitea/workflows/cicd.yaml +++ b/.gitea/workflows/cicd.yaml @@ -8,7 +8,7 @@ on: jobs: build: - name: Build + name: Build and Upload steps: - name: Checkout Source Code uses: actions/checkout@v4 @@ -27,6 +27,7 @@ jobs: - name: Publish artifacts uses: https://gitea.com/actions/gitea-upload-artifact@v4 with: + name: artifact path: | dist index.html @@ -36,4 +37,27 @@ jobs: src tsconfig.json vite.config.json - yarn.lock \ No newline at end of file + yarn.lock + upload: + steps: + - name: Download artifacts + uses: actions/download-artifact@v8 + with: + name: artifact + path: artifact + - name: Upload to server + run: | + mkdir ~/.ssh + chmod 600 ~/.ssh + echo "$SSH_KEYSCAN" > ~/.ssh/known_hosts + chmod 600 ~/.ssh/known_hosts + echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + cd artifact + sftp owofannouncements@foxthesystem.space <