mirror of
https://github.com/SqrtMinusOne/sqrtminusone.github.io.git
synced 2025-12-10 15:53:03 +03:00
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Build site
|
|
on:
|
|
repository_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
- name: Git Sumbodule Update
|
|
run: |
|
|
git pull --recurse-submodules
|
|
git submodule update --remote --recursive
|
|
- name: Setup Hugo
|
|
uses: peaceiris/actions-hugo@v2
|
|
with:
|
|
hugo-version: 'latest'
|
|
extended: true
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt install emacs-nox python3 python3-pip -y
|
|
pip3 install -r ./scripts/requirements.txt
|
|
- name: Run scripts
|
|
run: |
|
|
emacs -batch -l ./org/configs/publish.el
|
|
bash ./scripts/dot-stats-get-lengths.sh
|
|
python3 ./scripts/dot-stats-plot-history.py
|
|
python3 ./scripts/dot-stats-plot-lengths.py
|
|
- name: Build
|
|
run: hugo
|
|
- name: Deploy
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
if: github.ref == 'refs/heads/master'
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./public
|
|
- name: Toggle VPS
|
|
run: |
|
|
curl -XPOST https://sqrtminusone.xyz/deployer/ \
|
|
-H "Authorization: Bearer ${{ secrets.SERVER_TOKEN }}"
|