This commit is contained in:
parent
da0184a89c
commit
496e12ad77
1 changed files with 17 additions and 15 deletions
|
|
@ -1,18 +1,20 @@
|
||||||
name: Deploy
|
name: Build and Push
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
build:
|
||||||
runs-on: native
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build and deploy
|
- name: Build and push to registry
|
||||||
run: |
|
run: |
|
||||||
sudo podman build -t hugo-home:latest .
|
# Login to Forgejo registry (requires FORGEJO_TOKEN secret)
|
||||||
sudo podman stop hugo-home 2>/dev/null || true
|
echo "${{ secrets.FORGEJO_TOKEN }}" | docker login git.mardbrink.se -u hugomardbrink --password-stdin
|
||||||
sudo podman rm hugo-home 2>/dev/null || true
|
|
||||||
sudo podman run -d --name hugo-home --restart=always -p 127.0.0.1:8080:8080 hugo-home:latest
|
# Build and push the image
|
||||||
|
docker buildx build --push -t git.mardbrink.se/hugomardbrink/hugo.mardbrink.se:latest .
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue