Example update #895
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: Build and deploy | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**.md' | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build and deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Cache Node dependencies | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: pnpm | |
| - name: Cache Rust workspace | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-directories: "rust/.bin" | |
| workspaces: rust | |
| - name: Install Node dependencies | |
| run: pnpm install | |
| - name: Set up rust | |
| run: rustup target add wasm32-unknown-unknown && cd rust && cargo install cargo-run-bin && cargo bin --install | |
| - name: Debug | |
| run: echo "RUST_LOG=info" >> $GITHUB_ENV | |
| - name: Run build | |
| run: pnpm run build | |
| - name: Deploy | |
| if: github.ref == 'refs/heads/main' | |
| uses: burnett01/rsync-deployments@8.0.4 | |
| with: | |
| switches: -va --delete-after --exclude=data/ --exclude=priv/ --exclude=.well-known/ | |
| path: dist/ | |
| remote_path: noclip.website/ | |
| remote_host: iad1-shared-e1-29.dreamhost.com | |
| remote_user: gznoclip | |
| remote_key: ${{ secrets.DEPLOY_KEY }} |