Update .forgejo/workflows/deploy_prod.yml
Some checks failed
Build and Deploy Test Version (with Drafts) - next.asandikci.com / build-drafts-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy Test Version (with Drafts) - next.asandikci.com / build-drafts-and-deploy (push) Has been cancelled
This commit is contained in:
parent
e3f34bc6b7
commit
9f587e71e7
1 changed files with 37 additions and 8 deletions
|
@ -13,17 +13,44 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_deploy:
|
build-and-push-prod:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: bitnami/minideb:bookworm-arm64
|
image: git.asandikci.com/docker-images/website_builder:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup System Resources & Settings
|
- name: Git Clone
|
||||||
run: |
|
run: |
|
||||||
apt-get update -y
|
git clone https://git.asandikci.com/asandikci.com/web
|
||||||
apt-get upgrade -y
|
ls -la ./web
|
||||||
apt-get install git sshpass -y
|
|
||||||
|
- name: Build Site
|
||||||
|
run: |
|
||||||
|
cd web
|
||||||
|
bundle install
|
||||||
|
bundle exec jekyll b
|
||||||
|
env:
|
||||||
|
JEKYLL_ENV: "production"
|
||||||
|
|
||||||
|
- name: Push to "website" branch
|
||||||
|
run: |
|
||||||
|
mkdir website_branch && cd website_branch
|
||||||
|
git clone https://git.asandikci.com/asandikci.com/web
|
||||||
|
cd web
|
||||||
|
git checkout website
|
||||||
|
rm -rfv ./_site/
|
||||||
|
cp -rfv ../../web/_site .
|
||||||
|
git config --global user.name "Aliberk Sandıkçı (CI)"
|
||||||
|
git config --global user.email git+ci@asandikci.com
|
||||||
|
git add -A
|
||||||
|
git commit --all --message "Updated! [CI]"
|
||||||
|
git push https://asandikci:${{ secrets.PUSH_KEY }}@git.asandikci.com/asandikci.com/web
|
||||||
|
|
||||||
|
|
||||||
|
publish:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: git.asandikci.com/docker-images/website_builder:latest
|
||||||
|
steps:
|
||||||
- name: Checkout & Deploy
|
- name: Checkout & Deploy
|
||||||
run: |
|
run: |
|
||||||
git clone https://git.asandikci.com/asandikci.com/web
|
git clone https://git.asandikci.com/asandikci.com/web
|
||||||
|
@ -35,4 +62,6 @@ jobs:
|
||||||
sshpass -f ~/.passwd sftp -oBatchMode=no -o StrictHostKeyChecking=accept-new -b - ${{ secrets.SFTP_USERNAME_PROD }}@${{ vars.SFTP_HOST_PROD }} << !
|
sshpass -f ~/.passwd sftp -oBatchMode=no -o StrictHostKeyChecking=accept-new -b - ${{ secrets.SFTP_USERNAME_PROD }}@${{ vars.SFTP_HOST_PROD }} << !
|
||||||
put -r . www/
|
put -r . www/
|
||||||
bye
|
bye
|
||||||
!
|
!
|
||||||
|
|
||||||
|
## TODO: WILL BE REPLACED WITH NEW LFTP SETUP !!!
|
Loading…
Reference in a new issue