Setup GiteaAction to deploy website.
This commit is contained in:
parent
b694bed505
commit
84fdf4d9ad
39
.gitea/workflows/dev.yml
Normal file
39
.gitea/workflows/dev.yml
Normal file
@ -0,0 +1,39 @@
|
||||
name: Deploy Hugo
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: debian:12
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
steps:
|
||||
- name: Get package list
|
||||
run: apt-get update
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: hugo rclone
|
||||
version: 1.0
|
||||
|
||||
- name: Decode rclone config
|
||||
env:
|
||||
CONFIG: ${{ secrets.RCLONE_CONFIG }}
|
||||
run: |
|
||||
echo $RCLONE_CONFIG | base64 --decode > rclone.conf
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build
|
||||
run: hugo --minify --environment development
|
||||
|
||||
- name: Deploy
|
||||
run: rclone --config rclone.conf copy public/ remote:staging
|
||||
Loading…
x
Reference in New Issue
Block a user