added gitea workflow
This commit is contained in:
parent
17c0dee9d3
commit
50cbd1ef55
2 changed files with 24 additions and 36 deletions
24
.gitea/workflows/build_and_deploy.yaml
Normal file
24
.gitea/workflows/build_and_deploy.yaml
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
name: build and deploy website
|
||||||
|
run-name: ${{ gitea.actor }} is building the website
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
jobs:
|
||||||
|
deploy-main:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- run: echo "Automatically triggered by ${{ gitea.event_name }}"
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
github-server-url: 'https://git.lennartalff.net'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: apt update && apt install -y rsync hugo
|
||||||
|
- name: Build
|
||||||
|
run: hugo --minify
|
||||||
|
- name: Test
|
||||||
|
run: ls ${{ gitea.workspace }}
|
||||||
|
- run: echo "Finished with status: ${{ job.status }}"
|
||||||
|
|
||||||
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
|
|
@ -1,36 +0,0 @@
|
||||||
name: "Build and Deploy"
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- "*"
|
|
||||||
jobs:
|
|
||||||
Build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup Hugo
|
|
||||||
uses: peaceiris/actions-hugo@v2
|
|
||||||
with:
|
|
||||||
hugo-version: 'latest'
|
|
||||||
- name: Build
|
|
||||||
run: hugo --minify
|
|
||||||
- name: Deploy
|
|
||||||
uses: burnett01/rsync-deployments@5.2.1
|
|
||||||
if: github.ref == 'refs/heads/main'
|
|
||||||
with:
|
|
||||||
switches: -avzr --delete
|
|
||||||
path: public/
|
|
||||||
remote_path: ${{ secrets.DEPLOY_PATH }}
|
|
||||||
remote_host: ${{ secrets.DEPLOY_HOST }}
|
|
||||||
remote_user: ${{ secrets.DEPLOY_USER }}
|
|
||||||
remote_key: ${{ secrets.DEPLOY_KEY }}
|
|
||||||
remote_key_pass: ${{ secrets.DEPLOY_KEY_PASS }}
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in a new issue