diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-01-08 23:20:38 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-01-08 23:20:38 +0200 |
| commit | 576adb547cac5a3484aa1c53881e69bf0f729afd (patch) | |
| tree | e446da8d683774ef7263338d5b4ef2b5d172c898 /.github/workflows/cd.yml | |
| parent | dbea21d9c3642fce6b25837c2ec5fd704a7e8f2a (diff) | |
Implemented CD
Diffstat (limited to '.github/workflows/cd.yml')
| -rw-r--r-- | .github/workflows/cd.yml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..0c6c58a --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,42 @@ +name: continious deployment + +on: + push: + branches: [master] + +jobs: + cd: + name: Deploy + runs-on: ubuntu-latest + needs: ci + timeout-minutes: 5 + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.23.2" + + - name: Build executable + run: GOOS=linux GOARCH=amd64 go build ./cmd/server -o ./eko-server + + - name: Deploy to server + uses: easingthemes/ssh-deploy@main + with: + SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + ARGS: "-avz" + SOURCE: "eko-server" + REMOTE_HOST: eko.kyren.codes + REMOTE_USER: website + TARGET: "/srv/website" + SCRIPT_BEFORE: | + whoami + ls -al + SCRIPT_AFTER: | + whoami + ls -al + echo $RSYNC_STDOUT + |
