Skip to content

.github/workflows/hugo.yml #38

.github/workflows/hugo.yml

.github/workflows/hugo.yml #38

Workflow file for this run

on:
push:
branches: ["master"]
workflow_dispatch:
concurrency:
group: "comparch"
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
update:
runs-on: ubuntu-22.04
steps:
- name: Install
run: sudo apt-get update && sudo apt-get install nodejs hugo rclone
- name: Checkout
uses: nschloe/action-cached-lfs-checkout@v1
- name: Cache NPM dependencies
uses: actions/cache@master
with:
path: themes/geekblog/node_modules
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('themes/geekblog/package-lock.json') }}
- name: Build theme
working-directory: ${{ github.workspace }}/themes/geekblog
run: npm install && npm run build
- name: Build with Hugo
run: hugo
- name: Push to server
env:
RCLONE_CONFIG_COMPARCH_TYPE: ftp
RCLONE_CONFIG_COMPARCH_HOST: comparch.edu.cvut.cz
RCLONE_CONFIG_COMPARCH_USER: comparch_github
RCLONE_CONFIG_COMPARCH_PASS: ${{ secrets.FtpPass }}
run: |
rclone sync --exclude=stats/ public/ comparch:web/