2024-08-28 10:48:01 +00:00
|
|
|
name: build static site
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
container:
|
|
|
|
image: node:22-bookworm
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
|
|
|
|
- uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: |-
|
|
|
|
bin/
|
|
|
|
themes/
|
|
|
|
key: hugo-${{ runner.os }}-${{ hashFiles('Makefile', 'config.toml') }}
|
|
|
|
restore-keys: |
|
|
|
|
hugo-${{ runner.os }}
|
|
|
|
hugo
|
|
|
|
|
|
|
|
- name: make all
|
|
|
|
run: |
|
|
|
|
git submodule sync
|
|
|
|
rm -rf themes/dot-hugo
|
|
|
|
make all
|
|
|
|
|
2024-08-29 09:59:14 +00:00
|
|
|
- name: Setup SSH environment
|
|
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
env:
|
|
|
|
SSH_AUTH_SOCK: /tmp/ssh_agent.socket
|
|
|
|
run: |
|
|
|
|
umask 0077
|
|
|
|
mkdir -p ~/.ssh/
|
|
|
|
ssh-keyscan frostfs.info >> ~/.ssh/known_hosts
|
|
|
|
ssh-keygen -A # create host keys
|
|
|
|
ssh-agent -a "$SSH_AUTH_SOCK"
|
|
|
|
echo "${{ secrets.SSH_DEPLOY_KEY }}" > ~/.ssh/key
|
|
|
|
stat ~/.ssh/key
|
|
|
|
ssh-keygen -y -f ~/.ssh/key
|
|
|
|
ssh-add ~/.ssh/key
|
|
|
|
rm ~/.ssh/key
|
2024-08-28 10:48:01 +00:00
|
|
|
|
2024-08-29 09:59:14 +00:00
|
|
|
- name: make deploy
|
|
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
2024-08-28 10:48:01 +00:00
|
|
|
run: |
|
2024-08-29 09:59:14 +00:00
|
|
|
ssh-add -L
|
|
|
|
make deploy
|
|
|
|
env:
|
|
|
|
SSH_AUTH_SOCK: /tmp/ssh_agent.socket
|