Skip to content

Commit

Permalink
Test commit 2
Browse files Browse the repository at this point in the history
  • Loading branch information
phapsidesGT committed Sep 3, 2024
1 parent e1ae79c commit 1fce363
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 56 deletions.
44 changes: 34 additions & 10 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,48 @@
name: Deploy Shopify Theme (Test)
name: CI/CD Pipeline for Shopify

on:
pull_request:
types: [closed]
push:
branches:
- feature/github-actions # Change 'feature/github-actions' to main
- dev # Replace 'dev' with your test branch or 'main' for production

jobs:
deploy:
lhci:
name: Lighthouse CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Run Lighthouse CI
uses: shopify/lighthouse-ci-action@v1
with:
store: ${{ secrets.SHOPIFY_STORE_URL }}
access_token: ${{ secrets.SHOPIFY_CLI_AUTH_TOKEN }} # Using CLI token if applicable
collection_handle: all
lhci_github_app_token: ${{ secrets.GITHUB_TOKEN }} # Using the default GitHub token
pull_theme: ${{ secrets.SHOPIFY_THEME_ID }}

theme-check:
name: Theme Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Run Theme Check
uses: shopify/theme-check-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }} # Using the default GitHub token

deploy:
name: Deploy to Shopify Store
runs-on: ubuntu-latest
needs: [lhci, theme-check] # Ensure deployment runs after Lighthouse and Theme Check
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # Specify the Node.js version required
node-version: '14'

- name: Install Shopify CLI
run: npm install -g @shopify/cli @shopify/theme
Expand All @@ -27,9 +52,8 @@ jobs:
SHOPIFY_CLI_AUTH_TOKEN: ${{ secrets.SHOPIFY_CLI_AUTH_TOKEN }}
run: echo $SHOPIFY_CLI_AUTH_TOKEN | shopify login --store ${{ secrets.SHOPIFY_STORE_URL }} --password-stdin

- name: Deploy to Shopify Store
- name: Deploy Theme to Shopify
env:
SHOPIFY_PASSWORD: ${{ secrets.SHOPIFY_PASSWORD }}
SHOPIFY_STORE_URL: ${{ secrets.SHOPIFY_STORE_URL }}
SHOPIFY_THEME_ID: ${{ secrets.SHOPIFY_THEME_ID }}
run: shopify theme push --allow-live --themeid=${{ secrets.SHOPIFY_THEME_ID }}
52 changes: 26 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: CI
on: [push]
jobs:
lhci:
name: Lighthouse
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lighthouse
uses: shopify/lighthouse-ci-action@v1
with:
store: ${{ secrets.SHOP_STORE_OS2 }}
password: ${{ secrets.SHOP_PASSWORD_OS2 }}
access_token: ${{ secrets.SHOP_ACCESS_TOKEN }}
collection_handle: all
lhci_github_app_token: ${{ secrets.LHCI_GITHUB_TOKEN }}
pull_theme: ${{ secrets.SHOP_PULL_THEME }}
theme-check:
name: Theme Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Theme Check
uses: shopify/theme-check-action@v1
with:
token: ${{ github.token }}
# name: CI
# on: [push]
# jobs:
# lhci:
# name: Lighthouse
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Lighthouse
# uses: shopify/lighthouse-ci-action@v1
# with:
# store: ${{ secrets.SHOP_STORE_OS2 }}
# password: ${{ secrets.SHOP_PASSWORD_OS2 }}
# access_token: ${{ secrets.SHOP_ACCESS_TOKEN }}
# collection_handle: all
# lhci_github_app_token: ${{ secrets.LHCI_GITHUB_TOKEN }}
# pull_theme: ${{ secrets.SHOP_PULL_THEME }}
# theme-check:
# name: Theme Check
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Theme Check
# uses: shopify/theme-check-action@v1
# with:
# token: ${{ github.token }}
40 changes: 20 additions & 20 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Contributor License Agreement (CLA)
# name: Contributor License Agreement (CLA)

on:
pull_request_target:
types: [opened, synchronize, reopened]
issue_comment:
types: [created]
# on:
# pull_request_target:
# types: [opened, synchronize, reopened]
# issue_comment:
# types: [created]

jobs:
cla:
runs-on: ubuntu-latest
if: |
(github.event.issue.pull_request
&& !github.event.issue.pull_request.merged_at
&& contains(github.event.comment.body, 'signed')
)
|| (github.event.pull_request && !github.event.pull_request.merged)
steps:
- uses: Shopify/shopify-cla-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
cla-token: ${{ secrets.CLA_TOKEN }}
# jobs:
# cla:
# runs-on: ubuntu-latest
# if: |
# (github.event.issue.pull_request
# && !github.event.issue.pull_request.merged_at
# && contains(github.event.comment.body, 'signed')
# )
# || (github.event.pull_request && !github.event.pull_request.merged)
# steps:
# - uses: Shopify/shopify-cla-action@v1
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# cla-token: ${{ secrets.CLA_TOKEN }}

0 comments on commit 1fce363

Please sign in to comment.