Deploy uzERP Website #250
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy uzERP Website | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
schedule: | |
- cron: '0 3 * * *' | |
jobs: | |
build: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_KEY }} | |
name: id_rsa | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.98.0' | |
- name: Build | |
run: hugo | |
- name: Deploy | |
run: rsync --delete -rvzh ./public/ [email protected]:/var/www/html/www.uzerp.com/ |