Skip to content

Commit

Permalink
ci: deploy demo, release lib
Browse files Browse the repository at this point in the history
  • Loading branch information
davidenke committed Oct 20, 2024
1 parent 317108e commit c2b9c9e
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
id-token: write

concurrency:
group: "pages"
group: pages
cancel-in-progress: false

jobs:
Expand All @@ -23,17 +23,17 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run test -- --ci --reporters=default --reporters=jest-junit
- uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
check_name: "report"
check_name: report
include_passed: true
report_paths: "junit.xml"
report_paths: junit.xml

build:
needs: test
Expand All @@ -42,14 +42,19 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v4
if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
- if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: latest
name: latest-lib
path: lib
- if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: latest-dist
path: dist

deploy:
Expand All @@ -68,11 +73,11 @@ jobs:
- uses: actions/configure-pages@v4
- uses: actions/download-artifact@v4
with:
name: latest
name: latest-dist
path: dist
- uses: actions/upload-pages-artifact@v3
with:
path: "dist"
path: dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Expand All @@ -90,13 +95,13 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
node-version-file: .nvmrc
cache: npm
registry-url: https://registry.npmjs.org/
- uses: actions/download-artifact@v4
with:
name: latest
path: dist
name: latest-lib
path: lib

- run: |
git config user.email "${{ vars.NPM_EMAIL }}"
Expand Down

0 comments on commit c2b9c9e

Please sign in to comment.