Fixed firebase form #85
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: rmw-shell | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "packages/rmw-shell/src/**" | |
- "packages/rmw-shell/cra-template-rmw/template/**" | |
workflow_dispatch: | |
jobs: | |
rmw-shell: | |
runs-on: ubuntu-latest | |
environment: prod | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: npm i | |
working-directory: ./packages/rmw-shell | |
- name: Install release-it | |
run: npm i -g release-it | |
working-directory: ./packages/rmw-shell | |
- name: git config | |
run: | | |
npm config set legacy-peer-deps true | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: git pull | |
run: | | |
git diff | |
git add . | |
git commit -m "Update rmw-shell" | |
git pull | |
- name: Publish | |
run: npm run release | |
working-directory: ./packages/rmw-shell | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
rmw-shell-template: | |
if: ${{ always() }} | |
needs: [rmw-shell] | |
runs-on: ubuntu-latest | |
environment: prod | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: npm i | |
working-directory: ./packages/rmw-shell/cra-template-rmw | |
- name: Install release-it | |
run: npm i -g release-it | |
working-directory: ./packages/rmw-shell/cra-template-rmw | |
- name: git config | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: git pull | |
run: | | |
git add . | |
git commit -m "Update rmw-shell-template" | |
git diff | |
git pull | |
- name: Publish | |
run: npm run release | |
working-directory: ./packages/rmw-shell/cra-template-rmw | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
rmw-shell-demo: | |
if: ${{ always() }} | |
needs: [rmw-shell-template] | |
runs-on: ubuntu-latest | |
environment: prod | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
- name: git config | |
run: | | |
npm config set legacy-peer-deps true | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: install-rmw-shell | |
run: npx create-react-app demo-app --template rmw --use-npm | |
- name: install firebase functins dependencies | |
run: npm i | |
working-directory: ./demo-app/firebase/functions | |
- name: run build | |
run: | | |
npm run build | |
env: | |
CI: false | |
working-directory: ./demo-app | |
- name: Install firebase tools | |
run: npm i -g firebase-tools | |
- name: Deploy | |
run: | | |
firebase use prod | |
firebase deploy --only hosting --token $FIREBASE_TOKEN | |
working-directory: ./demo-app | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |