feat: migrate to jekyll
This commit is contained in:
@ -1,21 +1,46 @@
|
||||
on: push
|
||||
jobs:
|
||||
build-node:
|
||||
build-jeykll:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Ruby
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -y install build-essential ruby-full zlib1g-dev
|
||||
|
||||
- name: Setup Ruby Path
|
||||
run: |
|
||||
export GEM_HOME="$HOME/gems
|
||||
export PATH="$HOME/gems/bin:$PATH
|
||||
|
||||
- name: Setup Jekyll
|
||||
run: |
|
||||
gem install jekyll bundler
|
||||
bundle install
|
||||
|
||||
- name: Build with Jekyll
|
||||
run: |
|
||||
bundle exec jekyll build
|
||||
env:
|
||||
JEKYLL_ENV: production
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: comprofix_site
|
||||
path: _site
|
||||
|
||||
build-docker:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
needs: build-jeykll
|
||||
steps:
|
||||
- name: checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
|
||||
- name: Install Node Dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build 11ty Site
|
||||
run: npm run build --if-present
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: comprofix_site
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
@ -26,7 +51,7 @@ jobs:
|
||||
registry: git.comprofix.com
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
@ -34,9 +59,10 @@ jobs:
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: git.comprofix.com/mmckinnon/comprofix.com:latest
|
||||
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-docker
|
||||
steps:
|
||||
- name: checkout repo
|
||||
uses: actions/checkout@v4
|
||||
@ -51,9 +77,3 @@ jobs:
|
||||
ssh administrator@comprofix.com "cd /opt/comprofix; docker compose down" || true
|
||||
scp docker-compose.yml administrator@comprofix.com:/opt/comprofix
|
||||
ssh administrator@comprofix.com "cd /opt/comprofix; docker compose pull; docker compose up -d"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user