Skip to content

Update Receive_PR.yml #45

Update Receive_PR.yml

Update Receive_PR.yml #45

name: Deploy_web_site_with_ssh
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Change BASE_PATH
run: yq -i '.JB.BASE_PATH = "${{ vars.CGAL_WEB_SITE_URL }}"' _config.yml
- name: Remove demo/ (temporarily)
run: rm -rf demo/
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: install ssh keys
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ vars.SSH_HOST }} > ~/.ssh/known_hosts
- name: rsync
run: rsync -avz ./_site/ ${{ secrets.SSH_USER }}@${{ vars.SSH_HOST }}:${{ vars.SSH_USER }}
- name: cleanup
run: rm -rf ~/.ssh