Skip to content

deploy script for build 404 page (#34) #12

deploy script for build 404 page (#34)

deploy script for build 404 page (#34) #12

Workflow file for this run

name: Build and Deploy to GitHub Pages
on:
push:
branches:
- master
# Permissions for GitHub Pages deployment
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build project
run: npx nx build scaffiz_website --configuration production --base-href ./
- name: Create CNAME
run: echo "www.scaffiz.de" > docs/browser/CNAME
- name: Create 404.html
run: cp docs/browser/index.html docs/browser/404.html
- name: Disable Jekyll
run: touch docs/browser/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/browser
deploy:
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