Author SHA1 Message Date
leanderandClaude Opus 5.5 9a8076813b ci: deploy through the restricted uiogaming-deploy script
The old workflow ran docker compose in the repo folder, which failed because the containers belong to the server's top-level compose project. The deploy key can now only run /usr/local/bin/uiogaming-deploy (see UiO-Gaming/drift), so the workflow just passes the service name. Also adds manual runs and prevents overlapping deploys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 22:47:58 +01:00
leander d9efb8c51f Merge pull request #56 from UiO-Gaming/release-please--branches--main--components--uiogaming.no
chore(main): release uiogaming.no 1.0.1
2026-11-02 22:19:45 +01:00
github-actions[bot] a89c2f609d chore(main): release uiogaming.no 1.0.1 2026-11-02 21:18:29 +00:00
leander 15982ed804 Merge branch 'slop/sloppy-fixes'
# Conflicts:
#	README.md
2026-11-02 22:15:02 +01:00
leander a09b7ae871 elaborate on note about webhook 2026-11-01 22:24:20 +01:00
6 changed files with 34 additions and 20 deletions

No files matched your search

+11 -13
View File
@@ -4,31 +4,29 @@ on:
push:
branches:
- main
workflow_dispatch:
# Let a running deploy finish before the next one starts
concurrency:
group: deploy
cancel-in-progress: false
# Never run two deploys of this repo at the same time
concurrency: deploy
jobs:
run_pull:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Set up SSH
run: |
install -m 600 -D /dev/null ~/.ssh/id_ed25519
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519 # This should be redundant but seems to do the trick.
ssh-keyscan -H ${{ vars.SSH_HOST }} > ~/.ssh/known_hosts
# up --build builds the new image while the old container keeps serving,
# then swaps the container. Old images are pruned so they don't fill the disk
- name: Connect, pull, build and deploy
run: ssh ${{ secrets.SSH_USER }}@${{ vars.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git checkout ${{ vars.MAIN_BRANCH }} && git pull && docker compose up -d --build && docker image prune -f && exit"
# The deploy key can only run /usr/local/bin/uiogaming-deploy on the server. It takes the
# service name from the top-level docker-compose.yml (see drift/driftsdokumentasjon.md).
- name: Deploy
run: ssh ${{ secrets.SSH_USER }}@${{ vars.SSH_HOST }} uiogaming.no
- name: Clean up
if: always()
run: rm -rf ~/.ssh
permissions:
contents: read
+1 -1
View File
@@ -1,3 +1,3 @@
{
".": "1.0.0"
".": "1.0.1"
}
+9
View File
@@ -0,0 +1,9 @@
# Changelog
## [1.0.1](https://github.com/UiO-Gaming/uiogaming.no/compare/uiogaming.no-1.0.0...uiogaming.no-1.0.1) (2026-11-02)
### Bug Fixes
* filter function not working in firefox ([52e8087](https://github.com/UiO-Gaming/uiogaming.no/commit/52e8087229153d8465a9b257c1da5778b997e20a))
* photo credit text placement ([95f75d9](https://github.com/UiO-Gaming/uiogaming.no/commit/95f75d9bb1022407915da2eba5e9245e8b9e2ee4))
+10 -3
View File
@@ -45,11 +45,18 @@ Om du vil at innhold skal oppdatere seg når innholdet endres i backend må du k
MEN
Du må spesifisere URL for webhook i Sanity sitt dashbord. URLen dette webhooket skal peke på er `https://uiogaming.no/api/revalidate` med _POST_ forespørselstype.
Du må sette opp et webhook i [Sanity sitt dashbord](https://www.sanity.io/manage) under _API → Webhooks_:
Sett feltet _Secret_ på webhooket til samme verdi som `SANITY_REVALIDATE_SECRET` i `.env`. Sanity signerer da hver forespørsel, og APIet avviser forespørsler uten gyldig signatur.
- **URL:** `https://uiogaming.no/api/revalidate`
- **HTTP method:** POST
- **Projection:** Må minst inneholde `_type` og `slug`, f.eks `{_type, slug}`
- **Secret:** Samme verdi som `SANITY_REVALIDATE_SECRET` i `.env`
Du kan lese mer om det [her](https://www.sanity.io/docs/webhooks).
Sanity bruker _Secret_ til å signere hver forespørsel med headeren `sanity-webhook-signature`, og APIet avviser forespørsler uten gyldig signatur med `401`. Hemmeligheten skal altså ligge i _Secret_-feltet, ikke i URLen.
Webhooket oppdaterer blogginnlegg, arrangementer og forfattere med en gang. Annet innhold oppdateres først når cachen går ut (opptil en time).
Du kan lese mer om webhooks [her](https://www.sanity.io/docs/webhooks).
## Vil du bidra?
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "uiogaming.no",
"version": "1.0.0",
"version": "1.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "uiogaming.no",
"version": "1.0.0",
"version": "1.0.1",
"dependencies": {
"@portabletext/react": "^8.0.1",
"@sanity/client": "^8.14.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "uiogaming.no",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"description": "UiO Gaming Website",
"author": "Leander Furumo <leander@furumo.eu>",