added gitea actions
This commit is contained in:
parent
ba2efa42fd
commit
d2e750cc4a
44
.gitea/workflows/build.yaml
Normal file
44
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
name: Production
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Check Hugo version
|
||||||
|
run: hugo version
|
||||||
|
|
||||||
|
- name: Build staging
|
||||||
|
run: hugo --gc --minify --buildDrafts -b https://blog.broillet.ch/
|
||||||
|
|
||||||
|
- name: Copy (scp) staging build to blog server
|
||||||
|
uses: https://github.com/appleboy/scp-action@v0.1.4
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.SSH_HOSTNAME }}
|
||||||
|
username: root
|
||||||
|
port: 22
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
source: "public/*"
|
||||||
|
target: /var/www/html/staging/
|
||||||
|
|
||||||
|
- name: Build production
|
||||||
|
run: hugo --gc --minify -b https://blog.broillet.ch/
|
||||||
|
|
||||||
|
- name: Copy (scp) staging build to blog server
|
||||||
|
uses: https://github.com/appleboy/scp-action@v0.1.4
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.SSH_HOSTNAME }}
|
||||||
|
username: root
|
||||||
|
port: 22
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
source: "public/*"
|
||||||
|
target: /var/www/html/prod/
|
Loading…
Reference in New Issue
Block a user