Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 5 additions & 41 deletions .github/workflows/lighthouse-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [opened, synchronize]
jobs:
get-environment:
runs-on: [self-hosted, linux, x64]
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.get_environment.outputs.environment }}
steps:
Expand All @@ -26,10 +26,8 @@ jobs:
echo "error: Could not determine environment"
exit 1
fi
deploy:
runs-on: [self-hosted, linux, x64]
permissions:
contents: write
lighthouse-check:
runs-on: ubuntu-latest
needs: ["get-environment"]
environment:
name: ${{ needs.get-environment.outputs.environment }}
Expand All @@ -38,26 +36,6 @@ jobs:
node-version: [20.x]

steps:
- name: Grant Permissions on Workspace Directory
run: sudo chown -R ubuntu:ubuntu ${{ github.workspace }}

- name: Check out code
uses: actions/checkout@v4

- name: Use Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: "22.2.0"

- name: Set Environment
run: |
echo "Environment Name :- ${{ needs.get-environment.outputs.environment }}"
echo "ENVIRONMENT_NAME=${{ needs.get-environment.outputs.environment }}" >> $GITHUB_ENV
- name: Setup Node.js environment with ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- uses: actions/checkout@v2
- name: Lighthouse
uses: shopify/lighthouse-ci-action@v1
Expand All @@ -66,19 +44,5 @@ jobs:
store: ${{ secrets.SHOP_STORE }}
password: ${{ secrets.SHOP_PASSWORD }}
lhci_github_app_token: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
product_handle: alkaline-battery-28a-6v-1435632
collection_handle: batteries
pull_theme: ${{ secrets.PULL_THEME_ID }}

- name: Slack Notification - Failure
if: cancelled() || failure()
uses: rtCamp/action-slack-notify@master
env:
SLACK_USERNAME: Lighthouse CI check - ${{ needs.get-environment.outputs.environment }}
SLACK_TITLE: "Lighthouse CI Status"
SLACK_MESSAGE: "Failed: ${{ needs.get-environment.outputs.environment }} CI Failed"
MSG_MINIMAL: "true"
SLACK_ICON_EMOJI: ":rocket:"
SLACK_FOOTER: "Driven by lawson-ecommerce GitHub Actions"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: "danger"
product_handle: test-products
collection_handle: all
15 changes: 6 additions & 9 deletions .github/workflows/themecheck-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,23 @@ on:
jobs:
theme-check:
name: Shopify Theme Check
runs-on: [self-hosted, linux, x64]
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]

steps:
- name: Grant Permissions on Workspace Directory
run: sudo chown -R ubuntu:ubuntu ${{ github.workspace }}

- name: Check Out Code
uses: actions/checkout@v4

- name: Use Node.js 22.x
- name: Setup Node.js environment with ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: "22.2.0"
node-version: ${{ matrix.node-version }}

- uses: actions/checkout@v4
- name: Theme Check
uses: shopify/theme-check-action@v2
with:
theme_root: "."
base: main
version: "v3.65.2"
1 change: 1 addition & 0 deletions layout/theme.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -372,5 +372,6 @@
{%- if settings.cart_type == 'drawer' -%}
<script src="{{ 'cart-drawer.js' | asset_url }}" defer="defer"></script>
{%- endif -%}

</body>
</html>