Skip to content

chore(demo): use application builder #18

chore(demo): use application builder

chore(demo): use application builder #18

Workflow file for this run

name: "build"
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build:
name: Build, Test, Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 'latest'
- name: Setup node
uses: actions/setup-node@v3
with:
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build --configuration=production
- name: Test
run: pnpm test
- name: Lint
run: pnpm lint
- name: SPA 404 workaround
shell: sh
if: runner.os == 'Linux'
run: |
cp dist/apps/demo/index.html dist/apps/demo/404.html
- name: Archive artifact
shell: sh
if: runner.os == 'Linux'
run: |
chmod -c -R +rX "dist/apps/demo/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
tar \
--dereference --hard-dereference \
--directory "dist/apps/demo/" \
-cvf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \
--exclude=.github \
.
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
retention-days: 30
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