Skip to content

Commit

Permalink
Merge branch 'main' into feat/output_mapped_structured_data
Browse files Browse the repository at this point in the history
  • Loading branch information
ivladu-plenty authored Nov 18, 2024
2 parents 82ca8df + 9554dec commit fa7f626
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 9 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
name: Deploy PWA

on:
# release:
# types: [published]
# push:
# branches: [main]
release:
types: [published]
push:
branches: [main]
workflow_dispatch:
inputs:
environment:
description: 'The environment to deploy to'
type: choice
required: true
default: 'staging'
options:
- staging
- production
tag-version:
description: 'The tag version, branch name or SHA to checkout'
required: true
Expand All @@ -22,7 +30,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag-version }}
ref: ${{ inputs.tag-version || github.ref }}

- name: Enable corepack
run: corepack enable
Expand Down Expand Up @@ -84,10 +92,20 @@ jobs:
./middleware
outPath: pwa.tar.gz

- name: Upload File
id: upload
- name: Upload build to production
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && ${{ inputs.environment }} == 'production')
id: upload-production
uses: JantHsueh/upload-file-action@1.0
with:
url: 'https://pwapublish.plentysystems.com'
forms: '{ "token": "${{ secrets.URL_ENDPOINT_TOKEN }}" }'
fileForms: '{ "file": "pwa.tar.gz" }'

- name: Upload build to staging
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && ${{ inputs.environment }} == 'staging')
id: upload-staging
uses: JantHsueh/upload-file-action@1.0
with:
url: 'https://pwapublish.plentysystems.com'
forms: '{ "token": "${{ secrets.URL_ENDPOINT_TOKEN_STAGING }}" }'
fileForms: '{ "file": "pwa.tar.gz" }'
8 changes: 6 additions & 2 deletions apps/web/public/sitemap_style.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@
<table id="sitemap" cellpadding="3">
<thead>
<tr>
<th width="75%">URL</th>
<th width="25%">Last Modified</th>
<th width="70%">URL</th>
<th width="10%">Images</th>
<th width="20%">Last Modified</th>
</tr>
</thead>
<tbody>
Expand All @@ -167,6 +168,9 @@
<xsl:value-of select="sitemap:loc"/>
</a>
</td>
<td>
<xsl:value-of select="count(image:image)"/>
</td>
<td>
<xsl:value-of select="sitemap:lastmod"/>
</td>
Expand Down
10 changes: 10 additions & 0 deletions docs/changelog/changelog_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
- Newsletter email confirmation
- The default data for the homepage is now available for both English and German.

#### GitHub Action: Upload

The **Upload** action now supports deploying the PWA to different environments:

- Production: triggered manually or when creating a GitHub release
- Staging: triggered manually or when pushing a change to the `main` branch

Each client supports two PWA instances. With this change, you can designate the live instance as the production environment and the preview instance as the staging environment. The production environment uses the GitHub Actions Secret `URL_ENDPOINT_TOKEN`; the staging environment uses the GitHub Actions Secret `URL_ENDPOINT_TOKEN_STAGING`.

### 🩹 Fixed

- Load more accurate images sizes for product page.
Expand Down Expand Up @@ -43,6 +52,7 @@
- Enabled font color customization for the hero banner via a template property.
- Added a new carousel compoment.
- Added an edit mode toolbar and JSON editor for the front end. Note that this is a preparatory step. Further functionality will be added in an upcoming version.
- Added the image count to the item sitemaps.

### 🩹 Fixed

Expand Down

0 comments on commit fa7f626

Please sign in to comment.