-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (34 loc) · 1.25 KB
/
deploy_test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Build test branch and push to test server (test.collegiumacademicum.de)
on:
push:
branches: ["test"]
workflow_dispatch:
concurrency:
group: "ftp"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
# Build job
# path for newer debs:
# wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.96.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.96.0/hugo_extended_${HUGO_VERSION}_Linux-64bit.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install lftp
run: sudo apt install lftp
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js dependencies
run: "npm ci"
- name: Build with Hugo and Juice
run: bash build_test.sh
- name: Upload to FTP
run: lftp -c "set sftp:auto-confirm yes ; open -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} -p ${{ secrets.FTP_PORT }} sftp://${{ secrets.FTP_HOST }} ; mirror -Rn --ignore-time -P 12 upload/ /web/website_tmp ; quit"