fediwall/.github/workflows/deploy-pages.yml

48 lines
1.0 KiB
YAML
Raw Normal View History

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
with:
fetch-depth: 0 # Needed for tags
- 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
run: npm run build -- --base=./
- 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