38 lines
1,013 B
YAML
38 lines
1,013 B
YAML
|
name: "Build and Deploy PRODUCTION Version - asandikci.com"
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
|
||
|
permissions:
|
||
|
contents: read
|
||
|
pages: write
|
||
|
id-token: write
|
||
|
|
||
|
# Allow one concurrent deployment
|
||
|
concurrency:
|
||
|
group: "pages"
|
||
|
cancel-in-progress: true
|
||
|
|
||
|
jobs:
|
||
|
build_deploy:
|
||
|
runs-on: docker
|
||
|
container:
|
||
|
image: bitnami/minideb:bookworm-arm64
|
||
|
steps:
|
||
|
- name: Setup System Resources & Settings
|
||
|
run: |
|
||
|
apt-get update -y
|
||
|
apt-get upgrade -y
|
||
|
apt-get install git sshpass -y
|
||
|
|
||
|
- name: Checkout & Deploy
|
||
|
run: |
|
||
|
git clone https://git.asandikci.com/asandikci.com/web
|
||
|
cd web
|
||
|
git checkout website
|
||
|
cd _site
|
||
|
echo '${{ secrets.SFTP_PASSWORD_PROD }}' > ~/.passwd
|
||
|
chmod 0400 ~/.passwd
|
||
|
sshpass -f ~/.passwd sftp -oBatchMode=no -o StrictHostKeyChecking=accept-new -b - ${{ secrets.SFTP_USERNAME_PROD }}@${{ vars.SFTP_HOST_PROD }} << !
|
||
|
put -r . www/
|
||
|
bye
|
||
|
!
|