frostfs.info/.forgejo/workflows/build.yml

56 lines
1.4 KiB
YAML
Raw Normal View History

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
- 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
- name: make deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: |
ssh-add -L
make deploy
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.socket