Fixing issue where fields were being referenced incorrectly. #72
This file contains hidden or 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: Deploy | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "false" | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: .github/workflows/image | |
| push: true | |
| tags: avbor/avbor:protoc | |
| - name: Build binary | |
| uses: houseabsolute/actions-rust-cross@v0 | |
| with: | |
| command: build | |
| target: arm-unknown-linux-gnueabihf | |
| args: "--locked --release" | |
| strip: true | |
| - name: Package as archive | |
| shell: bash | |
| run: | | |
| cp target/arm-unknown-linux-gnueabihf/release/discord_status_bot discord_status_bot | |
| - name: Copy over | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.HOST }} | |
| username: ${{ secrets.USERNAME }} | |
| key: ${{ secrets.KEY }} | |
| port: ${{ secrets.PORT }} | |
| source: "discord_status_bot" | |
| target: ${{ secrets.TARGET_DIR }} | |
| - name: Restarting the job | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.HOST }} | |
| username: ${{ secrets.USERNAME }} | |
| key: ${{ secrets.KEY }} | |
| port: ${{ secrets.PORT }} | |
| script: cd ${{secrets.TARGET_DIR}} && sudo ./start_job.sh |