Skip to content

Commit 2a0c1b0

Browse files
authored
CICD: simplify deployment action
1 parent 336ead1 commit 2a0c1b0

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/website.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ on:
1010

1111
jobs:
1212
build:
13-
name: Build and Deploy
13+
name: Deploy Website
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: 🛒 Checkout
1717
uses: actions/checkout@v3
18-
1918
- name: ✨ Setup Hugo
2019
env:
2120
HUGO_VERSION: 0.92.2
@@ -25,14 +24,11 @@ jobs:
2524
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz" --output hugo.tar.gz
2625
tar -xvzf hugo.tar.gz
2726
sudo mv hugo /usr/local/bin
28-
2927
- name: 🛠️ Build
3028
run: hugo --source website --minify
31-
29+
- name: 🔐 Create Key File
30+
run: install -m 600 -D /dev/null ~/.ssh/id_rsa
3231
- name: 🔑 Install SSH Key
33-
run: |
34-
install -m 600 -D /dev/null ~/.ssh/id_rsa
35-
echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa
36-
32+
run: echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa
3733
- name: 🚀 Deploy
38-
run: rsync --archive --delete --stats -o StrictHostKeyChecking=no -e 'ssh -p 18765' website/public/ ${{ secrets.REMOTE_DEST }}
34+
run: rsync --archive --delete --stats -e 'ssh -p 18765 -o StrictHostKeyChecking=no' website/public/ ${{ secrets.REMOTE_DEST }}

0 commit comments

Comments
 (0)