Skip to content

Update docker-image.yml #8

Update docker-image.yml

Update docker-image.yml #8

Workflow file for this run

name: Jekyll Docker CI/CD
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build the Docker image and build Jekyll site
run: |
docker build . --file Dockerfile --tag jekyll-site:latest
docker run --rm -v $(pwd)/_site:/srv/jekyll/_site jekyll-site:latest jekyll build
- name: Upload _site folder as artifact
uses: actions/upload-artifact@v3
with:
name: site
path: _site
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Download site artifact
uses: actions/download-artifact@v3
with:
name: site
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
folder: _site