This commit is contained in:
35
.gitea/workflows/deploy.yaml
Normal file
35
.gitea/workflows/deploy.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
name: build-and-deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: klakegg/hugo:ext-ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build site
|
||||
run: hugo --minify
|
||||
env:
|
||||
HUGO_ENV: production
|
||||
|
||||
- name: Install Surfer CLI
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y npm
|
||||
npm install -g cloudron-surfer
|
||||
|
||||
- name: Deploy to Surfer
|
||||
run: |
|
||||
if ! surfer put --token ${{ secrets.SURFER_TOKEN }} --server ${{ secrets.SURFER_SERVER }} public/* /; then
|
||||
echo "Deployment failed"
|
||||
exit 1
|
||||
fi
|
Reference in New Issue
Block a user