Skip to content

Instantly share code, notes, and snippets.

@sylwit
Created December 8, 2021 03:48
Show Gist options
  • Save sylwit/f7e58cbce7b2b2ef74400531489ee8c8 to your computer and use it in GitHub Desktop.
Save sylwit/f7e58cbce7b2b2ef74400531489ee8c8 to your computer and use it in GitHub Desktop.
Github workflow to deploy a static app on Backblaze
name: Build and deploy react app to Backblaze
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
react:
runs-on: ubuntu-latest
steps:
- actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: yarn install
- run: yarn test
- run: yarn build
- uses: sylwit/install-b2-cli-action@v1.0.0
env:
B2_APPLICATION_KEY_ID: ${{ secrets.B2_APPLICATION_KEY_ID }}
B2_APPLICATION_KEY: ${{ secrets.B2_APPLICATION_KEY }}
- name: deploy
run: b2 sync --delete --replaceNewer ./out b2://mybucket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment