AkurAI Build
Menu

BifrOSt-Web

public

Latest change 45b4f25c107d9fc535a9d87bfb2c24aa5f1eda14 - Deploy BifrOSt Web through AkurAI Build by Ólafur Búi Ólafsson

version: 1
jobs:
  - name: verify
    executor: native
    branches: [main]
    run:
      - HOME=/home/olibuijr PATH=/home/olibuijr/.cargo/bin:/usr/bin:/bin cargo fmt --all -- --check
      - HOME=/home/olibuijr PATH=/home/olibuijr/.cargo/bin:/usr/bin:/bin cargo clippy --features server --all-targets --locked -- -D warnings
      - HOME=/home/olibuijr PATH=/home/olibuijr/.cargo/bin:/usr/bin:/bin cargo check --features web --target wasm32-unknown-unknown --locked

  - name: package
    needs: [verify]
    executor: native
    branches: [main]
    run:
      - HOME=/home/olibuijr PATH=/home/olibuijr/.cargo/bin:/usr/bin:/bin dx build --web --fullstack true --release --debug-symbols false --locked
      - test -x target/dx/bifrost-web/release/web/server
      - test -f target/dx/bifrost-web/release/web/public/index.html
      - test -f data/content.db
    artifacts:
      - target/dx/bifrost-web/release/web/server
      - target/dx/bifrost-web/release/web/public/
      - data/content.db
      - deploy/bifrost-web.service

  - name: deploy
    needs: [package]
    executor: native
    environment: production
    approval: true
    branches: [main]
    run: HOME=/home/olibuijr PATH=/home/olibuijr/.cargo/bin:/usr/bin:/bin ./deploy.sh