-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (44 loc) · 1.38 KB
/
oxygen-deployment-950295.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
# Don't change the line below!
#! oxygen_storefront_id: 950295
name: Storefront 950295
on:
- push
permissions:
contents: read
deployments: write
jobs:
deploy:
name: Deploy to Oxygen
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
check-latest: true
- name: Enable Corepack
run: corepack enable
- name: Install configured package manager
run: corepack install
- name: Set yarn version to 4.5.3
run: yarn set version 4.5.3
- name: Verify Yarn version
run: yarn --version
- name: Get yarn cache directory
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: '${{ steps.yarn-cache-dir-path.outputs.dir }}'
key: "${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}"
restore-keys: "${{ runner.os }}-yarn-\n"
- name: Install dependencies
id: install-dependencies
run: yarn
- name: Build and Publish to Oxygen
id: deploy
run: yarn run shopify hydrogen deploy --build-command "yarn run build"
env:
SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN: '${{ secrets.OXYGEN_DEPLOYMENT_TOKEN_950295 }}'