Files
Protocol-oral-history-project/.gitea/workflows/deploy.yaml
Drew 716fe6b66a
Some checks failed
build-and-deploy / build (push) Has been cancelled
edits workflow to use /tmp
2025-04-08 23:17:53 -06:00

41 lines
1.0 KiB
YAML

name: build-and-deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: 'linux_amd64'
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Hugo
run: |
mkdir -p /tmp/bin
wget https://github.com/gohugoio/hugo/releases/download/v0.121.1/hugo_extended_0.121.1_linux-amd64.tar.gz -P /tmp
tar -xf /tmp/hugo_extended_0.121.1_linux-amd64.tar.gz -C /tmp/bin
/tmp/bin/hugo version
- name: Build site
run: /tmp/bin/hugo --minify
env:
HUGO_ENV: production
- name: Install Surfer CLI
run: |
mkdir -p /tmp/npm
npm config set prefix '/tmp/npm'
npm install -g cloudron-surfer
- name: Deploy to Surfer
run: |
export PATH="/tmp/npm/bin:$PATH"
if ! surfer put --token ${{ secrets.SURFER_TOKEN }} --server ${{ secrets.SURFER_SERVER }} public/* /; then
echo "Deployment failed"
exit 1
fi