Add build to standard push in CI/CD #82
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: Master push | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci --no-optional | |
- run: npm run lint | |
- run: npm test | |
# A build isn't needed here but we want to make sure it works ok before try this during a publish. | |
- run: npm run build | |
- name: Configure AWS credentials for uploading docs | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_DOCS_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_DOCS_SECRET_KEY }} | |
aws-region: us-east-1 | |
# Create typedoc information and upload | |
- run: npm run doc | |
- run: aws s3 sync ./docs "s3://j2-docs/$GITHUB_REPOSITORY" |