From 2b699e82cdf880412ad364fb0aa66a3f901b0898 Mon Sep 17 00:00:00 2001 From: Kale Miller Date: Sat, 16 Dec 2023 15:18:06 +0800 Subject: [PATCH] Setup basic CD pipeline --- .github/workflows/cd.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..26a75f8 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,34 @@ +name: CD + +on: + push: + branches: [master] + +jobs: + push-to-vm: + name: Push to VM + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: "3.9" + + - name: Install Virtual Environment + run: pip install -r requirements.txt + + - name: Build site + run: make build + + - name: Push to VM + uses: appleboy/scp-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + source: "output/" + target: "kalemiller.com/blog/"