wiki/.forgejo/workflows/build.yaml

36 lines
842 B
YAML
Raw Normal View History

2024-08-08 13:13:28 +00:00
name: Build
2024-08-08 13:44:32 +00:00
on:
push:
branches:
- 'main'
paths:
- flake.*
- src/**/*
- .forgejo/**/*
- mkdocs.yml
2024-08-08 13:44:32 +00:00
2024-08-08 13:13:28 +00:00
jobs:
2024-08-08 13:56:35 +00:00
# Build it locally, this helps caching for later
2024-08-08 13:13:28 +00:00
build:
runs-on: nix
steps:
2024-08-08 13:44:32 +00:00
# get the repo first
2024-08-11 21:19:49 +00:00
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: https://forgejo.skynet.ie/Skynet/actions-deploy-to-skynet/get_lfs@v3
with:
repository: ${{ gitea.repository }}
ref_name: ${{ gitea.ref_name }}
2024-08-08 13:13:28 +00:00
- name: "Build the Wiki"
2024-08-08 13:44:32 +00:00
run: nix build --verbose
2024-08-08 13:56:35 +00:00
# deploy it upstream
2024-08-08 13:44:32 +00:00
deploy:
runs-on: docker
needs: [ build ]
steps:
2024-08-11 21:19:49 +00:00
- uses: https://forgejo.skynet.ie/Skynet/actions-deploy-to-skynet/deploy@v3
2024-08-08 13:44:32 +00:00
with:
input: 'skynet_website_wiki'
token: ${{ secrets.API_TOKEN_FORGEJO }}