test 5 #16
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "14" | |
- name: Install dependencies | |
run: npm install | |
tsc: | |
needs: build-and-deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Move to app | |
run: cd app | |
- name: TypeScript compile | |
run: npm run tsc | |
generate-docs: | |
needs: tsc | |
runs-on: ubuntu-latest | |
steps: | |
- name: Move to app | |
run: cd app | |
- name: Generate documentation | |
run: npx typedoc | |
deploy-docs: | |
needs: generate-docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy documentation | |
run: firebase deploy --token ${{ secrets.FIREBASE_TOKEN }} | |
npm-publish: | |
needs: deploy-docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Move to app | |
run: cd app | |
- name: Publish to NPM | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |