-
Notifications
You must be signed in to change notification settings - Fork 274
57 lines (52 loc) · 1.52 KB
/
examples-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
# Don't change the line below!
#! oxygen_storefront_id: 1000014888
name: Examples deploy
on: [push]
permissions:
contents: read
deployments: write
jobs:
deploy:
strategy:
matrix:
examples:
[
{
name: 'optimistic-cart-ui',
token: '${{ secrets.OXYGEN_DEPLOYMENT_TOKEN_1000014888 }}',
},
]
name: Deploy to Oxygen
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: 📦 Build packages
run: |
CI=true npm run build:pkg
- name: Build and Publish to Oxygen
id: deploy
working-directory: examples/${{ matrix.examples.name }}
run: npx shopify hydrogen deploy --no-lockfile-check --diff
env:
SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN: ${{ matrix.examples.token }}