Skip to content

fixing the react front #556

fixing the react front

fixing the react front #556

Workflow file for this run

name: Rust deploy
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/[email protected]
# - name: Build
# run: cargo build --verbose
- name: Run releases
run: cargo build --release
- name: Deploy release
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
source: "./target/release"
target: ${{ secrets.RUST_TARGET_PATH }}
- name: Deploy files
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
source: "./public,./resources"
target: ${{ secrets.RUST_DEPLOY_PATH }}
- name: restart service
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
sudo systemctl stop avored.service
sudo systemctl start avored.service
# - name: change file ownership
# uses: appleboy/[email protected]
# with:
# host: ${{ secrets.HOST }}
# username: ${{ secrets.USERNAME }}
# key: ${{ secrets.SSH_KEY }}
# port: ${{ secrets.PORT }}
# script: sudo chown -R www-data:www-data ${{ secrets.RUST_TARGET_PATH}}