erick.is/.github/workflows/build-deploy-prod.yml
2024-12-02 08:19:35 -05:00

29 lines
858 B
YAML

name: Build & Deployment
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Site
run: >-
docker run --rm
--workdir /app
-v ${{ github.workspace }}:/app
--entrypoint bash ruby:3.3 -c
"gem install bundler && bundle install && JEKYLL_ENV=production bundle exec jekyll build --config _config.yml && chmod -R 777 ./dist"
- name: Deploy Site
uses: milanmk/actions-file-deployer@master
with:
remote-protocol: "sftp"
remote-host: ${{ secrets.HOST }}
remote-port: ${{ secrets.PORT }}
remote-user: ${{ secrets.USERNAME }}
ssh-private-key: ${{ secrets.KEY }}
sync: full
local-path: ./dist/
remote-path: /html/erick.is