-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.3 KB
/
main.yml
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
39
40
41
42
name: Auto deploy
on:
push:
branches:
- main
jobs:
website:
name: Website build and deploy
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
repository: studieren-ohne-grenzen/website
ref: master
submodules: true
- name: Update content submodule to latest commit
run: git submodule update --remote --checkout
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Enable corepack for yarn
run: corepack enable
- name: Install Yarn packages
run: yarn install --immutable
- name: Build static website
run: yarn run generate
# I chose rclone because it supports synchronization like rsync, supports SFTP,
# and is 4 times faster than https://github.com/Dylan700/sftp-upload-action
# -Daniel Lerch
- name: Install rclone
run: sudo DEBIAN_FRONTEND=noninteractive apt-get update -y && sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq rclone
- name: Deploy to kueken.studieren-ohne-grenzen.org
run: rclone sync ./dist :sftp:/html --sftp-host=${{ vars.SFTP_HOST }} --sftp-user=${{ vars.SFTP_USERNAME }} --sftp-pass=${{ secrets.SFTP_PASSWORD_OBSCURED }} --sftp-disable-hashcheck=true --progress --stats-one-line --stats=5s