migrate mqtt to nfs #2814
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 to Production" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Run all Verifications/Tests | |
runs-on: amd64-runner | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Read .nvmrc | |
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | |
- name: Use Node.js (.nvmrc) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
- name: Install deps | |
run: yarn | |
- name: Prepare | |
run: yarn nx run-many --target=prepare --parallel --all | |
env: | |
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }} | |
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }} | |
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }} | |
- name: Run all tests | |
run: yarn run test/all | |
- name: Coverage | |
if: always() | |
run: yarn run test/coverage/all | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODE_COV_TOKEN }} | |
deploy: | |
name: Test and Deploy Affected Apps | |
runs-on: amd64-runner | |
needs: | |
- test | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Read .nvmrc | |
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | |
- name: Use Node.js (.nvmrc) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
- name: Install deps | |
run: yarn | |
- name: Prepare | |
run: yarn nx run-many --target=prepare --parallel --all | |
env: | |
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }} | |
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }} | |
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }} | |
- name: Install jsonnet plugins | |
run: jb install | |
- name: Deploy affected apps | |
run: yarn nx affected --target=deploy --parallel --base=HEAD~ --head=HEAD --verbose --exclude=manual-deployment,pihole,guest-db,gaming-library-db | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODE_COV_TOKEN }} | |
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }} | |
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }} | |
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }} | |
NODE_ENV: production | |
- name: Remove disk pressure taint | |
run: ./scripts/bin/remove-evicted-pods.sh || true |