Skip to content

Commit

Permalink
Configure CD in jekyll.yml Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Mar 21, 2024
1 parent 2cc80f0 commit aca9a18
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ on:
branches: [ main ]

jobs:
build_v1:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the site in the jekyll/builder container
run: |
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
jekyll/builder:latest /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future"

build:
runs-on: ubuntu-latest
Expand All @@ -29,4 +19,23 @@ jobs:
- name: Build
uses: actions/jekyll-build-pages@v1
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v1

deploy:
environment: zellerlab.org
runs-on: ubuntu-latest
name: Deploy
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: github-pages
path: dist
- name: Deploy
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
SOURCE: dist

0 comments on commit aca9a18

Please sign in to comment.