Skip to content

Commit

Permalink
CICD: simplify deployment action
Browse files Browse the repository at this point in the history
  • Loading branch information
swharden authored Sep 4, 2024
1 parent 336ead1 commit 2a0c1b0
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ on:

jobs:
build:
name: Build and Deploy
name: Deploy Website
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout
uses: actions/checkout@v3

- name: ✨ Setup Hugo
env:
HUGO_VERSION: 0.92.2
Expand All @@ -25,14 +24,11 @@ jobs:
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz" --output hugo.tar.gz
tar -xvzf hugo.tar.gz
sudo mv hugo /usr/local/bin
- name: 🛠️ Build
run: hugo --source website --minify

- name: 🔐 Create Key File
run: install -m 600 -D /dev/null ~/.ssh/id_rsa
- name: 🔑 Install SSH Key
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa
run: echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa
- name: 🚀 Deploy
run: rsync --archive --delete --stats -o StrictHostKeyChecking=no -e 'ssh -p 18765' website/public/ ${{ secrets.REMOTE_DEST }}
run: rsync --archive --delete --stats -e 'ssh -p 18765 -o StrictHostKeyChecking=no' website/public/ ${{ secrets.REMOTE_DEST }}

0 comments on commit 2a0c1b0

Please sign in to comment.