mirror of
https://github.com/UiO-Gaming/uiogaming.no.git
synced 2026-11-05 13:56:47 +01:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a8076813b
|
||
|
|
d9efb8c51f | ||
|
|
a89c2f609d | ||
|
|
15982ed804
|
||
|
|
a09b7ae871
|
No files matched your search
@@ -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,3 +1,3 @@
|
||||
{
|
||||
".": "1.0.0"
|
||||
".": "1.0.1"
|
||||
}
|
||||
@@ -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))
|
||||
@@ -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?
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -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
@@ -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>",
|
||||
|
||||
Reference in new issue
Block a user