Skip to content

Merge pull request #5 from mweiershaeuser/develop #5

Merge pull request #5 from mweiershaeuser/develop

Merge pull request #5 from mweiershaeuser/develop #5

name: Build and Deploy to GitHub Pages
on:
push:
branches: ["main"]
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build -- --base-href /loyolaorsino/
- run: cp ./dist/loyolaorsino/index.html ./dist/loyolaorsino/404.html
- run: npm run test
- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: './dist/loyolaorsino'
deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4