36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
name: Build and push to webserver
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
container:
|
|
image: archlinux:base-devel
|
|
steps:
|
|
- name: Prepare container
|
|
run: |
|
|
pacman -Sy --noconfirm archlinux-keyring
|
|
pacman -Syu --noconfirm
|
|
pacman -S --noconfirm nodejs git make pacman-contrib base base-devel openssh wget curl procps-ng bash hugo go git-lfs rsync just markdownlint-cli2 clang
|
|
git lfs install
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
lfs: 'true'
|
|
|
|
- name: Check
|
|
run: just check
|
|
|
|
- name: Build website
|
|
run: just build
|
|
|
|
- name: Copy to server
|
|
if: github.ref == 'refs/heads/master'
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
chmod -R 700 ~/.ssh
|
|
echo "${{ secrets.SSH_WEBSITE }}" > ~/.ssh/id_ed25519
|
|
echo "web.srv.it-syndikat.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHBRXGn/UNvz31QMDm1jqR+97aZ0xy6kQS9wnuDOukET" >> ~/.ssh/known_hosts
|
|
chmod -R 700 ~/.ssh
|
|
rsync -vva --delete-after public/* public/.* deployer@web.srv.it-syndikat.org:/
|