Skip to content

ERROR fix 404 correct permalink for github pages #37

ERROR fix 404 correct permalink for github pages

ERROR fix 404 correct permalink for github pages #37

Workflow file for this run

name: build and deploy GitHub page
on:
push:
branches: [ "feature/my-website" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: create env file
run: |
touch .env
echo BASE_PATH="/my-website" >> .env
- name: Build
run: |
npm install
npm run lint
npm run build:prod
- uses: actions/upload-artifact@v3
with:
name: page
path: dist
if-no-files-found: error
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: page
path: .
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v2
with:
path: .
- id: deployment
uses: actions/deploy-pages@v3