deployment actions and git cleanup
This commit is contained in:
parent
dd50d34703
commit
d4bcd0d466
16 changed files with 103 additions and 1166 deletions
40
.forgejo/workflows/deploy.yaml
Normal file
40
.forgejo/workflows/deploy.yaml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: node:20-bookworm
|
||||
volumes:
|
||||
- /srv/www/piekarnikgosi.pl:/srv/www/piekarnikgosi.pl
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
sparse-checkout: |
|
||||
/*
|
||||
!www
|
||||
!resources
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: ">=1.26.2"
|
||||
cache: true
|
||||
cache-dependancy-path: go.mod
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
go generate
|
||||
go run . -c generate
|
||||
|
||||
- name: Sync to Production
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync
|
||||
rsync -vrtlD --no-perms --delete www/ /srv/www/piekarnikgosi.pl/
|
||||
Loading…
Add table
Add a link
Reference in a new issue