forked from TrueCloudLab/frostfs.info
Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
576d108b3b | |||
6190e5a098 | |||
449a8c33bd | |||
42cea4b03e |
5 changed files with 69 additions and 8 deletions
55
.forgejo/workflows/build.yml
Normal file
55
.forgejo/workflows/build.yml
Normal file
|
@ -0,0 +1,55 @@
|
|||
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
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,7 +3,7 @@
|
|||
*.log
|
||||
*.lock
|
||||
tmp/
|
||||
bin/hugo
|
||||
bin/hugo*
|
||||
|
||||
public/
|
||||
resources/_gen
|
||||
|
|
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,4 +1,4 @@
|
|||
[submodule "themes/dot-hugo"]
|
||||
path = themes/dot-hugo
|
||||
url = git@git.frostfs.info:TrueCloudLab/dot-hugo.git
|
||||
url = https://git.frostfs.info/TrueCloudLab/dot-hugo
|
||||
branch = frostfs_design_version
|
||||
|
|
16
Makefile
16
Makefile
|
@ -3,26 +3,32 @@ SHELL = bash
|
|||
|
||||
PUBDIR = public
|
||||
HUGO_VERSION = 0.91.0
|
||||
HUGO_BIN ?= bin/hugo
|
||||
HUGO_BIN ?= bin/hugo-$(HUGO_VERSION)
|
||||
|
||||
.PHONY: all clean
|
||||
all: public
|
||||
|
||||
bin/hugo:
|
||||
bin/hugo-$(HUGO_VERSION):
|
||||
@wget -q https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_extended_$(HUGO_VERSION)_Linux-64bit.tar.gz -O - |\
|
||||
tar -xz -C bin/ hugo;
|
||||
@mv bin/hugo $@
|
||||
|
||||
clean:
|
||||
@rm -rf $(PUBDIR)
|
||||
@rm -rf tmp
|
||||
@rm -rf bin/hugo
|
||||
@rm -rf bin/hugo*
|
||||
|
||||
public: submodules bin/hugo
|
||||
public: submodules $(HUGO_BIN)
|
||||
@$(HUGO_BIN)
|
||||
|
||||
server: submodules bin/hugo
|
||||
server: submodules $(HUGO_BIN)
|
||||
@$(HUGO_BIN) server --disableFastRender
|
||||
|
||||
submodules:
|
||||
@git submodule init
|
||||
@git submodule update --recursive --remote
|
||||
|
||||
.PHONY: deploy
|
||||
deploy:
|
||||
test -f public/index.html
|
||||
cd public && tar --gzip --create . | ssh deploy@frostfs.info frostfs.info
|
||||
|
|
|
@ -49,7 +49,7 @@ link = "https://git.frostfs.info/TrueCloudLab"
|
|||
languageName = "En"
|
||||
languageCode = "en-us"
|
||||
weight = 1
|
||||
copyright = "Copyright © [TrueCloudLab](https://git.frostfs.info/TrueCloudLab) 2022-2023"
|
||||
copyright = "Copyright © [TrueCloudLab](https://git.frostfs.info/TrueCloudLab) 2022-2024"
|
||||
|
||||
# banner
|
||||
[Languages.en.params.banner]
|
||||
|
|
Loading…
Reference in a new issue