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

47 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
2024-09-18 13:38:08 +02:00
- run: cd axum_server && just prod > server.log 2>&1 &
2024-09-18 13:10:06 +02:00
- name: Wait for server
2024-09-18 13:28:24 +02:00
uses: iFaxity/wait-on-action@v1.2.1
2024-09-18 13:25:17 +02:00
with:
resource: http://localhost:3081
2024-09-18 12:56:49 +02:00
- name: run ssg
run: just ssg
working-directory: axum_server
2024-09-18 13:17:18 +02:00
- name: Server log
run: cat axum_server/server.log
2024-09-17 21:38:04 +02:00
- uses: actions/upload-artifact@v4
with:
name: dist
path: axum_server/dist/
retention-days: 10