frostfs.info/.forgejo/workflows/build.yml
Vitaliy Potyarkin f5224aa320
Some checks failed
build static site / build (pull_request) Failing after 23s
build static site / build (push) Has been cancelled
deploy: add troubleshooting information
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-08-29 13:23:26 +03:00

59 lines
1.4 KiB
YAML

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: Fake DNS name for development # TODO: remove this step after switching DNS records
run: |
echo '185.73.212.7 frostfs.info' >> /etc/hosts
curl -v --head frostfs.info
- name: Setup SSH environment
# TODO: add deploy conditions
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.socket
run: |
umask 0077
mkdir -p ~/.ssh/
ssh-keyscan frostfs.info >> ~/.ssh/known_hosts
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
run: |
ssh-add -L
make deploy
# TODO: add deploy conditions
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.socket