Skip to content
name: Deploy the WOO 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 }}
API_BASE_URL: "https://opencatalogi.accept.commonground.nu/apps/opencatalogi/api"
NL_DESIGN_THEME_CLASSNAME: "conduction-theme"
DEV_ENVIRONMENT: "false"
SHOW_CATEGORY: "true"
SHOW_ORGANIZATION: "true"
FAVICON_URL: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACClBMVEUAAABrlGUuu9VcnkLUUpdivEfEN2oCsNHLZ6kywtQAt9N2ukfWV6EIudiTzHMgvtjSUZoFps1OokKrN2XUWZp0sEJ6ukQhv9N4wUfSaqnGOGwAtdUgv9Nxw3BUvoxDxNbWMn4AutZmytvRYaU6tFvIXKJ+pUcRvtLRYaWSzXR/pEcCvdKh0X9CsU1wn0FKxdY6w9bNZKXBN3IBrtLCTIiXyknsqcw2to/lmMJGwthUxtiSyErNZKdtpkK7N2ZBt4JsvEaXykej0XuGslk5t43nlcHTRYoiwNMAuc5omD7PSovLJ2Q8wtZSs0hMu4LUbaPWWqOVTE0AutLRbqcBrtLbVqAUv9QCvNKVSExWx9mAxVI/uojJWKNvzd0QvtOQQ0vEJV48w9dFxNfeUJ2sMls6qVKuKV6HxWUgv9UCnssAstIGtdMAs9QDvdPJb6wCrtLNZ6jMZKfPNnVIt06fzUpHxNYAuNY8w9UkutQevdMPvtLWfbTMaqrJZ6XXRZPWQJDWNoev1YXQO4Sr1Hg4t16azFSQuVFevEySyUtSxtcxwdUiv9MuvtMkttPttNIDqdHnpMrairzKca7Lca3GYKXFX6TPW6LMWqLNS5fNSo5Hu409uozNRIHcMIBswX6Xz3qOzXlZvnmizHekzXFYvW5IuWaXzWRev2OYxFmjzk+KwU2WykuCtUl6vUMorhJkAAAAanRSTlMAAwUQBf7n2tmualYyKiMaGhkMC/39+fj39fPy8O3r6ufi4N/e3dza1dLPzsXFxb++u7m4tbOxq6mmpaKhnZuYlpOPj4uGhYN/dXRycHBtbGZeW1pUTkZGRkNAPTw5NzczLiciIh0XFBAKJueTxwAAAS9JREFUOMtiGAX0BYxMcBYjjMGCkOb34eR05wUJRjmaWnMLAVlp/hZmrjxQ+ST90vKeSvVwBkY/2ZKS1WK2zAwpRiIT+qqVQ8HyTFadpb352VXa/NFy81pLOtaKejLaFTVVT6wp0EgGKUiUL6/oByrIDXKZtbBjZeuqNXrxbEVNNYXTCgoCQAoACxPvzs7Kz8nN9TCfvbR9WfOKNrVAqaKZkwvr6+rcQAriZCqzs7JyynK57Je0Fy9vXtymFcE2p3ZSYUPDXG+QggyDLrACRV5uCdbilvmNi5yFTWrz8qbMqFdIALsyUqkCqECai0HIAahgQaMOH0MMR17e1OmSXtBAibVkZzcOAYYVs6+uiqYTH1CIx4ZD1TAYHlZMgoKZEBZzajpEF4uAgDDDKKAmAADVcVLNADZRYwAAAABJRU5ErkJggg=="
ORGANISATION_NAME: "BCT"
JUMBOTRON_IMAGE_URL: "https://raw.githubusercontent.com/ConductionNL/${{github.event.repository.name}}/main/jumbotron.jpg"
FOOTER_LOGO_URL: "false"
FOOTER_LOGO_HREF: "https://bctsoftware.com/"
FOOTER_CONTENT: "https://raw.githubusercontent.com/ConductionNL/${{github.event.repository.name}}/main/FooterContent.json"
FOOTER_CONTENT_HEADER: "heading-3"
# OIDN_NUMBER: " "
ENV_VARS_SET: "true"
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get the WOO Website Template Code
uses: actions/checkout@v2
with:
repository: ConductionNL/woo-website-template-apiv2
ref: main
# With special thanxs to https://github.com/SpicyPizza/create-envfile
- name: Make envfile
uses: SpicyPizza/create-envfile@v2.0
with:
envkey_GITHUB_REPOSITORY_NAME: ${{ env.GITHUB_REPOSITORY_NAME }}
envkey_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX: ${{ env.USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX }}
envkey_GATSBY_API_BASE_URL: ${{ env.API_BASE_URL }}
envkey_GATSBY_NL_DESIGN_THEME_CLASSNAME: ${{ env.NL_DESIGN_THEME_CLASSNAME }}
envkey_GATSBY_DEV_ENVIRONMENT: ${{ env.DEV_ENVIRONMENT }}
envkey_GATSBY_SHOW_CATEGORY: ${{ env.SHOW_CATEGORY }}
envkey_GATSBY_SHOW_ORGANIZATION: ${{ env.SHOW_ORGANIZATION }}
envkey_GATSBY_FAVICON_URL: ${{ env.FAVICON_URL }}
envkey_GATSBY_ORGANISATION_NAME: ${{ env.ORGANISATION_NAME }}
envkey_GATSBY_JUMBOTRON_IMAGE_URL: ${{ env.JUMBOTRON_IMAGE_URL }}
envkey_GATSBY_FOOTER_LOGO_URL: ${{ env.FOOTER_LOGO_URL }}
envkey_GATSBY_FOOTER_LOGO_HREF: ${{ env.FOOTER_LOGO_HREF }}
envkey_GATSBY_FOOTER_CONTENT: ${{ env.FOOTER_CONTENT }}
envkey_GATSBY_FOOTER_CONTENT_HEADER: ${{ env.FOOTER_CONTENT_HEADER }}
# envkey_GATSBY_OIDN_NUMBER: ${{ env.OIDN_NUMBER }}
envkey_GATSBY_ENV_VARS_SET: ${{ env.ENV_VARS_SET }}
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: 18
- name: Install dependencies
run: cd pwa && npm install
- name: Install parcel/watcher
run: cd pwa && npm install @parcel/watcher
- 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/github-pages-deploy-action@4.1.0
with:
branch: ${{ env.GITHUB_PAGES_BRANCH }}
folder: pwa/public