forked from trmcnvn/dolan
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (47 loc) · 1.31 KB
/
main.yml
File metadata and controls
47 lines (47 loc) · 1.31 KB
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
on:
push:
branches:
- master
pull_request:
name: CI
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
# make sure all code has been formatted with rustfmt
- name: check rustfmt
run: cargo fmt -- --check --color always
# run clippy to verify we have no warnings
- name: cargo fetch
run: cargo fetch
- name: cargo clippy
run: cargo clippy -- -D warnings
deploy:
name: Deploy
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
needs: [lint]
env:
KAMAL_SERVER: ${{ secrets.MRSK_SERVER }}
DOLAN_TOKEN: ${{ secrets.DOLAN_TOKEN }}
DOLAN_OPENAI: ${{ secrets.DOLAN_OPENAI }}
DOLAN_CF_ACCOUNT: ${{ secrets.DOLAN_CF_ACCOUNT }}
DOLAN_CF_API: ${{ secrets.DOLAN_CF_API }}
KAMAL_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: false
- uses: shimataro/ssh-key-action@v2.5.1
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: unnecessary
- run: gem install kamal
- run: kamal setup