It is now possible to upload images #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main # Trigges ved push til main-branchen | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js environment | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' # Angir Node-versjon 16 som er kompatibel med Vite | |
- name: Install dependencies | |
run: npm ci # Bruker npm ci for å installere basert på package-lock.json for konsistens | |
- name: Build the project | |
env: | |
VITE_BASE_URL: '/bookingapp/' # Spesifiser base-URL direkte under bygging | |
run: npm run build # Bygg prosjektet | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |