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: jobs:
build: build:
runs-on: 'linux_amd64' runs-on: 'lightsail-runner'
container:
image: klakegg/hugo:0.121.1-ext-ubuntu
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 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 - name: Build site
run: /tmp/bin/hugo --minify run: hugo --minify
env: env:
HUGO_ENV: production HUGO_ENV: production
- name: Install Surfer CLI - name: Setup Node.js
run: | uses: actions/setup-node@v3
mkdir -p /tmp/npm with:
npm config set prefix '/tmp/npm' node-version: '18'
npm install -g cloudron-surfer
- name: Deploy to Surfer - name: Install and Deploy with Surfer
run: | 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 if ! surfer put --token ${{ secrets.SURFER_TOKEN }} --server ${{ secrets.SURFER_SERVER }} public/* /; then
echo "Deployment failed" echo "Deployment failed"
exit 1 exit 1
fi