-
-
Notifications
You must be signed in to change notification settings - Fork 296
52 lines (41 loc) · 1.17 KB
/
loco-gen-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: "[loco-gen-deploy]"
on:
push:
branches:
- master
pull_request:
env:
RUST_TOOLCHAIN: stable
TOOLCHAIN_PROFILE: minimal
LOCO_DEV_MODE_PATH: ${{ github.workspace }}
jobs:
g-deploy-docker:
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 --path ./loco-new
- name: create myapp
run: |
loco new -n myapp --db sqlite --bg async --assets serverside -a
working-directory: /tmp
- name: generate deployment
run: cargo loco generate deployment --kind docker
working-directory: /tmp/myapp
- name: copy local loco dependency
run: |
cp -r ${{github.workspace}} /tmp/myapp/loco
- name: build deployment
run: docker build -t demo .
working-directory: /tmp/myapp