Update name #21
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: Deploy | |
on: | |
push: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
jobs: | |
DEPLOY: | |
runs-on: ubuntu-latest | |
steps: | |
- name: git-checkout | |
uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Setup Rust | |
run: | | |
rustup target add wasm32-unknown-unknown | |
cargo clippy | |
cargo fmt --check | |
- name: Download and install Trunk binary | |
run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.18.2/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- | |
- name: Build | |
run: ./trunk build --release | |
- name: Install Vercel CLI | |
run: npm i -g vercel@latest | |
- name: Pull vercel info | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy | |
id: deployment | |
working-directory: ./dist | |
run: | | |
vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }} >> $GITHUB_STEP_SUMMARY | |
echo $GITHUB_STEP_SUMMARY |