keks.cloud/content/posts/2023-08-02-webpage-with-act...

1.1 KiB

title date draft
Webpage with Forgejo Action 2023-08-02T14:49:09+02:00 false

To keep the Webpage in sync with the state in git we now use a forgejo action pipeline.

name: GitHub Pages

on:
  push:
    branches:
      - main  # Set a branch to deploy
  pull_request:

jobs:
  deploy:
    runs-on: docker
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true  # Fetch Hugo themes (true OR recursive)
          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod

      - name: Setup Hugo
        uses: https://github.com/peaceiris/actions-hugo@v2
        with:
          hugo-version: '0.112.0'
          # extended: true

      - name: Build
        run: hugo --minify
      
      - name: copy file via ssh password
        uses: https://github.com/appleboy/scp-action@v0.1.4
        with:
          host: "static.keks.cloud"
          username: ${{ secrets.USERNAME }}
          key: ${{ secrets.KEY }}
          source: "public/*"
          target: "/var/www/keks.cloud/"
          strip_components: 1