2023-07-15 09:25:11 +02:00
|
|
|
name: Deploy demo site to GitHub Pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: ["main"]
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: "pages"
|
|
|
|
cancel-in-progress: false
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-07-20 12:25:16 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0 # Needed for tags
|
2023-07-15 09:25:11 +02:00
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18
|
|
|
|
- name: Fetch dependencies
|
|
|
|
run: npm ci
|
|
|
|
- name: Copy demo config
|
|
|
|
run: cp .github/workflows/demo-config.json public/wall-config.json
|
|
|
|
- name: Build
|
2023-07-20 13:22:32 +02:00
|
|
|
run: npm run build -- --base=./
|
2023-07-15 09:25:11 +02:00
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-pages-artifact@v2
|
|
|
|
with:
|
|
|
|
path: dist/
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
needs: build
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
id: deployment
|
|
|
|
uses: actions/deploy-pages@v2
|