Repository navigation
Handle moving average updates on candle revisions #376
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 | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: write-all | |
| concurrency: | |
| group: build-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| targets: wasm32-unknown-unknown | |
| - name: Cache cargo | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Install trunk | |
| run: cargo install trunk | |
| - name: Clean dist | |
| run: rm -rf dist | |
| - name: Build | |
| run: trunk build --release --dist dist --public-url /dev/ | |
| - name: Save version | |
| run: echo ${{ github.sha }} > dist/version | |
| - name: Archive dist | |
| run: tar -czf dist.tar.gz -C dist . | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist.tar.gz | |
| - name: Send build to bot | |
| env: | |
| TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
| TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
| run: scripts/send_to_bot.sh dist.tar.gz "Development build" | |
| - name: Deploy dev build to gh-pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: dist | |
| destination_dir: dev | |