michalvankodev-site/.gitea/workflows/release.yaml

46 lines
1.1 KiB
YAML
Raw Normal View History

2024-09-17 21:38:04 +02:00
name: release
2024-09-18 12:50:28 +02:00
on:
push:
branches:
main
2024-09-17 21:38:04 +02:00
2024-09-17 21:59:33 +02:00
env:
PORT: 3081
2024-09-17 21:38:04 +02:00
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
2024-09-18 12:47:25 +02:00
- name: cache
uses: Swatinem/rust-cache@v2
working-directory: axum_server
2024-09-17 21:48:34 +02:00
- uses: taiki-e/install-action@just
2024-09-18 13:10:06 +02:00
# - uses: JarvusInnovations/background-action@v1
# with:
# run: just prod &
# working-directory: axum_server
# wait-on: http://localhost:3081
# wait-for: 10m
# tail: true
- uses: nickderobertis/background-task-action@v1
2024-09-18 12:52:26 +02:00
with:
2024-09-18 13:10:06 +02:00
run: cd axum_server && just prod
- name: Wait for server
run: |
curl --retry 20 --retry-delay 3 --fail --retry-connrefused -Lsv http://localhost:3081
2024-09-18 12:56:49 +02:00
- name: run ssg
run: just ssg
working-directory: axum_server
2024-09-17 21:38:04 +02:00
- uses: actions/upload-artifact@v4
with:
name: dist
path: axum_server/dist/
retention-days: 10