michalvankodev-site/.gitea/workflows/release.yaml
Michal Vanko ca4e9674d4
Some checks failed
release / release (push) Has been cancelled
test / cargo test (push) Has been cancelled
lets see what te just prod says
2024-09-18 15:37:02 +02:00

54 lines
1.3 KiB
YAML

name: release
on:
push:
branches:
main
env:
PORT: 3081
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: cache
uses: Swatinem/rust-cache@v2
working-directory: axum_server
- uses: taiki-e/install-action@just
# - uses: JarvusInnovations/background-action@v1
# with:
# run: just prod &
# working-directory: axum_server
# wait-on: http://localhost:3081
# wait-for: 10m
# tail: true
- name: Build release
run: cargo build --release
working-directory: axum_server
- name: Run server in background
run: just prod
working-directory: axum_server
- uses: cygnetdigital/wait_for_response@v2.0.0
with:
url: 'http://localhost:3081/'
responseCode: '200,500'
timeout: 50000
interval: 2000
- name: run ssg
run: just ssg
working-directory: axum_server
- name: Server log
run: cat axum_server/server.log
- uses: actions/upload-artifact@v4
with:
name: dist
path: axum_server/dist/
retention-days: 10