mirror of
https://git.madhouse-project.org/algernon/iocaine.git
synced 2025-02-15 22:26:19 +01:00
75 lines
2 KiB
YAML
75 lines
2 KiB
YAML
## SPDX-FileCopyrightText: 2025 Gergely Nagy
|
|
## SPDX-FileContributor: Gergely Nagy
|
|
##
|
|
## SPDX-License-Identifier: MIT
|
|
|
|
name: documentation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
paths:
|
|
- 'flake.nix'
|
|
- 'flake.lock'
|
|
- 'docs/**'
|
|
|
|
jobs:
|
|
documentation:
|
|
runs-on: nixos-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: setup magic attic cache
|
|
uses: actions/magic-attic-cache@main
|
|
with:
|
|
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
|
|
|
|
- name: zola check
|
|
uses: actions/nix/develop@main
|
|
with:
|
|
run: zola check
|
|
|
|
- name: build the docs site
|
|
uses: actions/nix/develop@main
|
|
with:
|
|
run: zola build
|
|
|
|
- name: prepare for deployment
|
|
if: ${{ github.ref_name == 'main' }}
|
|
env:
|
|
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
|
|
S3_SECRET_KEY_ID: ${{ secrets.S3_SECRET_KEY_ID }}
|
|
run: |
|
|
mc alias set -q target https://s3.madhouse-project.org \
|
|
"${S3_ACCESS_KEY_ID}" "${S3_SECRET_KEY_ID}"
|
|
mc stat --quiet target/sites/iocaine.madhouse-project.org
|
|
|
|
- name: deploy
|
|
if: ${{ github.ref_name == 'main' }}
|
|
run: |
|
|
mc mirror --remove --overwrite \
|
|
public/ \
|
|
target/sites/iocaine.madhouse-project.org/
|
|
|
|
|
|
notification:
|
|
runs-on: nixos-latest
|
|
needs: documentation
|
|
if: ${{ github.ref_name == 'main' }}
|
|
steps:
|
|
- name: fedi-notify
|
|
uses: https://github.com/cbrgm/mastodon-github-action@v1
|
|
env:
|
|
MASTODON_URL: ${{ secrets.QUENCH_SERVER_URL }}
|
|
MASTODON_ACCESS_TOKEN: ${{ secrets.QUENCH_ACCESS_TOKEN }}
|
|
with:
|
|
visibility: "unlisted"
|
|
message: |
|
|
Successfully deployed ${{ github.repository }}!
|
|
|
|
Commit: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
|
|
Target: https://iocaine.madhouse-project.org/
|