2025-01-17 00:52:46 +01:00
|
|
|
name: Build blog
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
2025-01-17 00:57:23 +01:00
|
|
|
build:
|
2025-01-17 00:52:46 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v4
|
2025-01-17 01:13:52 +01:00
|
|
|
with:
|
2025-01-17 02:03:58 +01:00
|
|
|
token: ${{ secrets.BLOGPOSTSSECRET }}
|
2025-01-17 01:13:52 +01:00
|
|
|
submodules: recursive
|
2025-01-17 00:54:42 +01:00
|
|
|
- run: sudo apt -qqy update
|
2025-01-17 01:20:28 +01:00
|
|
|
- run: sudo apt -qqy install wget
|
|
|
|
- run: wget https://github.com/gohugoio/hugo/releases/download/v0.141.0/hugo_0.141.0_linux-amd64.deb
|
|
|
|
- run: sudo dpkg -i hugo_0.141.0_linux-amd64.deb
|
2025-01-17 00:53:53 +01:00
|
|
|
- run: hugo
|
2025-01-17 01:11:19 +01:00
|
|
|
- uses: actions/upload-artifact@v3
|
2025-01-17 00:59:18 +01:00
|
|
|
with:
|
2025-01-17 00:57:23 +01:00
|
|
|
name: blog-public
|
|
|
|
path: public/
|
2025-01-17 01:47:08 +01:00
|
|
|
- uses: appleboy/scp-action@v0.1.7
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.DEPLHOST }}
|
|
|
|
username: ${{ secrets.DEPLUSR }}
|
|
|
|
key: ${{ secrets.DEPLKEY }}
|
|
|
|
source: "public"
|
|
|
|
strip_components: 1
|
|
|
|
target: /var/www/krzyzanowski.dev/blog
|
2025-01-17 00:52:46 +01:00
|
|
|
|