Actions updated
This commit is contained in:
parent
b78c7c594e
commit
54ebc983e0
@ -1,12 +1,6 @@
|
|||||||
name: Build Zola Website
|
name: Build Zola Website
|
||||||
|
|
||||||
on:
|
on: pull_request
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -25,32 +19,3 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
zola build
|
zola build
|
||||||
|
|
||||||
deploy:
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master' && success()
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
- 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: "./public/"
|
|
||||||
SERVER_IP: ${{ secrets.SERVER_IP }}
|
|
||||||
USERNAME: ${{ secrets.USERNAME }}
|
|
||||||
SERVER_DESTINATION: "/srv/www/cz/pkmples/www"
|
|
||||||
|
|
||||||
|
36
.gitea/workflows/build_and_deploy.yaml
Normal file
36
.gitea/workflows/build_and_deploy.yaml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Build and Deploy Zola Website
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_deploy:
|
||||||
|
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
|
||||||
|
|
||||||
|
- 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: "./public/"
|
||||||
|
SERVER_IP: ${{ secrets.SERVER_IP }}
|
||||||
|
USERNAME: ${{ secrets.USERNAME }}
|
||||||
|
SERVER_DESTINATION: ${{ if(github.ref == 'refs/heads/master') }}/srv/www/cz/pkmples/www${{ else }}/srv/www/cz/pkmples/dev${{ endif }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user