-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (64 loc) · 2.57 KB
/
opencatalogi-page-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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"
# ORGANIZATION: ""
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: development
# With special thanxs to https://github.com/SpicyPizza/create-envfile
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX: ${{ env.USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX }}
envkey_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_ORGANIZATION: ${{ env.ORGANIZATION }}
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