feat(demo): remove version number #1
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 demo' | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build, Test, Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 'latest' | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm nx build demo --configuration=production | |
- name: Test | |
run: pnpm nx test demo | |
- name: Lint | |
run: pnpm nx lint demo | |
- name: SPA 404 workaround | |
run: cp dist/apps/demo/browser/index.html dist/apps/demo/browser/404.html | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: dist/apps/demo/browser/ | |
deploy-demo: | |
name: Deploy demo | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy demo to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |