Skip to content

Add GitHub Action that builds the website #4

Add GitHub Action that builds the website

Add GitHub Action that builds the website #4

Workflow file for this run

name: Auto deploy
on:
push:
jobs:
website:
name: Website build and deploy
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
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: '20'
- name: Install Yarn packages
run: yarn install --immutable
- name: Build static website
run: yarn run generate
- 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 --sftp-host ${{ vars.SFTP_HOST }} --sftp-user ${{ vars.SFTP_USERNAME }} --sftp-pass ${{ secrets.SFTP_PASSWORD }} ./dist kueken:/html --progress --stats-one-line --stats=5s