Skip to content

Commit

Permalink
Update CD steps
Browse files Browse the repository at this point in the history
  • Loading branch information
w0rp committed Nov 20, 2023
1 parent 2dd7226 commit 3a95188
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Check out the code
- name: Checkout code
uses: actions/checkout@v4

# Set up SSH
# This is a GPT hallucination, probably.
- name: Setup SSH connection
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DENSEBOT_PRIVATE_SSH_KEY }}

# Run Hugo on the server to build the site
- name: Build Site with Hugo
run: |
ssh [email protected] "cd ~/denseanalysis-org && ./deploy.sh"
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DENSEBOT_PRIVATE_SSH_KEY }}
script_stop: true
script: ~/denseanalysis-org/deploy.sh
4 changes: 4 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ set -eu
# Make sure we run this from the directory the script is in.
cd "$(dirname "${BASH_SOURCE[0]}")"

# Pull the latest code.
git pull
# Update submodules such as the template.
git submodule update --init
# Build the Hugo image from scratch.
image=$(docker build -q .)
# Run Hugo.
Expand Down

0 comments on commit 3a95188

Please sign in to comment.