adds deployment via docker image
Some checks failed
build-and-deploy / build (push) Has been cancelled

This commit is contained in:
Drew
2025-04-12 10:21:27 -06:00
parent 716fe6b66a
commit 0f9968727a

View File

@ -7,35 +7,28 @@ on:
jobs:
build:
runs-on: 'linux_amd64'
runs-on: 'lightsail-runner'
container:
image: klakegg/hugo:0.121.1-ext-ubuntu
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
run: 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: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Deploy to Surfer
- name: Install and Deploy with Surfer
run: |
export PATH="/tmp/npm/bin:$PATH"
npm install -g cloudron-surfer
if ! surfer put --token ${{ secrets.SURFER_TOKEN }} --server ${{ secrets.SURFER_SERVER }} public/* /; then
echo "Deployment failed"
exit 1
fi
exit 1