Skip to content

Commit

Permalink
feat: added gh pages deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
mweiershaeuser committed Apr 27, 2024
1 parent 900d464 commit 1a09994
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build-and-deploy-to-ghpages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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: 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'
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

0 comments on commit 1a09994

Please sign in to comment.