[blocked on 0.14] ci: add gen deploy #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "[loco-gen-deploy]" | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
RUST_TOOLCHAIN: stable | |
TOOLCHAIN_PROFILE: minimal | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install seaorm cli | |
run: cargo install sea-orm-cli | |
- name: install 'loco new' | |
run: | | |
cargo install loco | |
- name: create myapp | |
run: | | |
loco new -n myapp --db sqlite --bg async --assets serverside -a | |
- name: | |
run: cargo loco generate deployment && docker build -t demo . | |
working-directory: ./myapp | |
env: | |
LOCO_DEPLOYMENT_KIND: docker |