Skip to content

rocket 0.5.0

rocket 0.5.0 #36

Workflow file for this run

---
name: CI
on:
push:
branches:
- dev
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cache Crates
uses: actions/cache@v3
with:
path: |
./target
~/.cargo
key: debug-${{ hashFiles('Cargo.lock') }}
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Run Cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run Cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
test:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cache Crates
uses: actions/cache@v3
with:
path: |
./target
~/.cargo
key: debug-${{ hashFiles('Cargo.lock') }}
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
publish:
needs: [check, test]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cache Crates
uses: actions/cache@v3
with:
path: |
./target
~/.cargo
key: debug-${{ hashFiles('Cargo.lock') }}
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build
- name: Build sadraskol blog
uses: actions-rs/cargo@v1
with:
command: run
args: gen
- name: tar
run: tar -czf dist.tar.gz dist/
- name: Configure AWS credentials from Test account
uses: aws-actions/configure-aws-credentials@v1-node16
with:
audience: gh-deploy
role-to-assume: arn:aws:iam::724822905508:role/deploy_role
aws-region: eu-west-3
- name: S3 cp
run: aws s3 cp --acl public-read dist.tar.gz s3://deploy.sadraskol.com/dist.tar.gz