Merge pull request #3 from Respo/router #16
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
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: {} | |
| name: Upload | |
| jobs: | |
| build_and_test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: nightly | |
| components: clippy | |
| - uses: jetli/trunk-action@v0.4.0 | |
| with: | |
| # Optional version of trunk to install(eg. 'v0.8.1', 'latest') | |
| version: 'latest' | |
| - uses: actions-rs/clippy-check@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| args: --all-features | |
| - run: cargo test | |
| - run: rustup target add wasm32-unknown-unknown && trunk build --release | |
| - name: Deploy to server | |
| id: deploy | |
| uses: Pendect/action-rsyncer@v2.0.0 | |
| env: | |
| DEPLOY_KEY: ${{secrets.rsync_private_key}} | |
| with: | |
| flags: "-avzr --progress" | |
| options: "" | |
| ssh_options: "" | |
| src: "dist/*" | |
| dest: "rsync-user@tiye.me:/web-assets/repo/${{ github.repository }}" | |
| - name: Display status from deploy | |
| run: echo "${{ steps.deploy.outputs.status }}" |