Skip to content

Deploy to GH Pages

Deploy to GH Pages #2

Workflow file for this run

name: Deploy to GH Pages
on:
workflow_call:
workflow_dispatch:
env:
NODE_VERSION: '20'
jobs:
build:
name: Build app
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ env.NODE_VERSION }}
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install dependencies and build
env:
APP_RELEASE: 'EBP Dev Release'
run: |
npm ci
npm run build-dev-ebp
cp ./dist/browser/index.html ./dist/browser/404.html
- name: Create CNAME file for custom domain
run: echo 'dev.geo.zh.ch' > ./dist/browser/CNAME
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist/browser
deploy:
name: Deploy to GH pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4