diff --git a/.github/workflows/prod-server-cd.yml b/.github/workflows/prod-server-cd.yml new file mode 100644 index 0000000..d5fc50d --- /dev/null +++ b/.github/workflows/prod-server-cd.yml @@ -0,0 +1,84 @@ +name: Production Server CD + +on: + push: + branches: + - main +jobs: + backend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: technote-space/get-diff-action@v4 + with: + PATTERNS: | + src/**/*.+(ts|tsx) + FILES: | + package.json + RELATIVE: "server" + - name: Configure SSH + run: | + mkdir -p ~/.ssh/ + echo "$SSH_KEY" > ~/.ssh/production.key + chmod 600 ~/.ssh/production.key + cat >>~/.ssh/config < ~/.ssh/production.key + chmod 600 ~/.ssh/production.key + cat >>~/.ssh/config <>./.env <