Merge pull request #53 from Learn-Quickly/dev #129
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: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: self-hosted | |
steps: | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions/checkout@v3 | |
- name: Copy secrets | |
run: | | |
echo ${{secrets.ENVIRONMENT}} | base64 -d > .env | |
# echo ${{secrets.ENVIRONMENT_DB}} | base64 -d > .env_db | |
- name: Stop and remove previous container | |
run: | | |
docker compose down || true | |
docker rmi lqrl-back-web_server:latest || true | |
- name: Run server | |
run: | | |
docker compose up -d |