54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
name: Build Zola Website
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Zola
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: zola@0.17.2
|
|
|
|
- name: Build Zola Website
|
|
run: |
|
|
zola build
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: list
|
|
run: |
|
|
echo ${{ github.workspace }}
|
|
echo $GITHUB_WORKSPACE
|
|
ls $GITHUB_WORKSPACE
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master' && success()
|
|
|
|
steps:
|
|
- name: Deploy to server
|
|
uses: AEnterprise/rsync-deploy@v1.0.2
|
|
env:
|
|
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
|
|
ARGS: "-e -c -r --delete"
|
|
SERVER_PORT: 22
|
|
FOLDER: "${{ github.workspace }}"
|
|
SERVER_IP: ${{ secrets.SERVER_IP }}
|
|
USERNAME: ${{ secrets.USERNAME }}
|
|
SERVER_DESTINATION: "/srv/www/cz/pkmples/www"
|
|
|