From d7c781d532a7402071722867cf9e610656b26d13 Mon Sep 17 00:00:00 2001 From: Magnus Smari Smarason Date: Sat, 17 May 2025 21:59:17 +0000 Subject: [PATCH] Configure GitHub Pages deployment via Actions --- .github/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..8bfc611 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 \ No newline at end of file diff --git a/package.json b/package.json index d5a0aed..ca673ed 100644 --- a/package.json +++ b/package.json @@ -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",