Skip to content

BUGFIX HeaderTemplate with pathPrefix #14

BUGFIX HeaderTemplate with pathPrefix

BUGFIX HeaderTemplate with pathPrefix #14

name: Deploy the Product Page to GitHub Pages
env: # Change these to your preferences any image url can also be a base encoded image
GITHUB_PAGES_BRANCH: gh-pages
# options: "true" | "false"
USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX: "true"
GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }}
ME_URL: "https://api.opencatalogi.nl/api/users/me"
API_URL: "https://api.opencatalogi.nl/api"
ADMIN_URL: "https://api.opencatalogi.nl/admin"
BASE_URL: "https://api.opencatalogi.nl"
FRONTEND_URL: "https://api.opencatalogi.nl"
LOGIN_REDIRECT: "vault"
ADMIN_DASHBOARD_URL: "https://admin.opencatalogi.nl"
NL_DESIGN_THEME_CLASSNAME: rotterdam-theme
ARROW_BREADCRUMBS: "false"
GITHUB_ORGANIZATION_URL: "https://github.com/OpenCatalogi"
on:
push:
branches:
- feature/OP-56/deployment-workflow
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get the Open Catalogi Web APP
uses: actions/checkout@v2
with:
repository: OpenCatalogi/web-app
ref: feature/OP-56/deployment-workflow
# With special thanxs to https://github.com/SpicyPizza/create-envfile
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX: ${{ env.USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX }}
envkey_GATSBY_GITHUB_REPOSITORY_NAME: ${{ env.GITHUB_REPOSITORY_NAME }}
envkey_GATSBY_ME_URL: ${{ env.ME_URL }}
envkey_GATSBY_API_URL: ${{ env.API_URL }}
envkey_GATSBY_ADMIN_URL: ${{ env.ADMIN_URL }}
envkey_GATSBY_BASE_URL: ${{ env.BASE_URL }}
envkey_GATSBY_FRONTEND_URL: ${{ env.FRONTEND_URL }}
envkey_GATSBY_LOGIN_REDIRECT: ${{ env.LOGIN_REDIRECT }}
envkey_GATSBY_ADMIN_DASHBOARD_URL: ${{ env.ADMIN_DASHBOARD_URL }}
envkey_GATSBY_NL_DESIGN_THEME_CLASSNAME: ${{ env.NL_DESIGN_THEME_CLASSNAME }}
envkey_GATSBY_ARROW_BREADCRUMBS: ${{ env.ARROW_BREADCRUMBS }}
envkey_GATSBY_GITHUB_ORGANIZATION_URL: ${{ env.GITHUB_ORGANIZATION_URL }}
directory: pwa/static
file_name: .env.production
fail_on_empty: true
sort_keys: false
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install dependencies
run: cd pwa && npm install
- name: Remove old Gatsby cache
run: rm -rf pwa/.cache
- name: Build application
run: cd pwa && npm run build
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: ${{ env.GITHUB_PAGES_BRANCH }}
folder: pwa/public