-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from HydrologicEngineeringCenter/feature/cicd-i…
…mprovements CI/CD Overhaul
- Loading branch information
Showing
1,369 changed files
with
959 additions
and
98,164 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Build, Test, and Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build-test-publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Generate and build API | ||
run: npm run buildApi | ||
|
||
- name: Install dependencies in tests directory | ||
working-directory: tests | ||
run: npm ci | ||
|
||
- name: Link cwmjs dependency from src to tests | ||
run: npm run link | ||
|
||
- name: Run tests | ||
working-directory: tests | ||
run: npm run test --ci | ||
|
||
- name: Publish to npm | ||
if: success() | ||
working-directory: cwmsjs | ||
run: npm publish --provenance --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Build docs | ||
if: success() | ||
run: npm run buildDocs | ||
|
||
- name: Upload docs artifact | ||
if: success() | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./cwmsjs/docs | ||
|
||
deploy-docs: | ||
needs: build-test-publish | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
wwwroot/*.js | ||
node_modules | ||
typings | ||
cwmsjs/ | ||
cwms-swagger*.json |
Oops, something went wrong.