Configure GitHub Pages deployment via Actions

This commit is contained in:
Magnus Smari Smarason
2025-05-17 21:59:17 +00:00
parent 8ec303fdd2
commit d7c781d532
2 changed files with 29 additions and 1 deletions

28
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Deploy to GitHub Pages
on:
push:
branches:
- main # Or your default branch
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write # Allows gh-pages to push to the gh-pages branch
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # Or your preferred Node.js version
- name: Install dependencies
run: npm ci
- name: Deploy to GitHub Pages
run: npm run deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # gh-pages needs this to push

View File

@ -3,7 +3,7 @@
"private": true,
"version": "0.1.0",
"type": "module",
"homepage": "https://magnussmari.github.io/arctic-species-2025-frontend",
"homepage": "https://magnussmari.github.io/Arctic_portal_temp/",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",