Skip to content

Migrate from oxygenctl-action to Hydrogen CLI #19

Migrate from oxygenctl-action to Hydrogen CLI

Migrate from oxygenctl-action to Hydrogen CLI #19

# Don't change the line below!
#! oxygen_storefront_id: 28246038
name: Storefront 28246038
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: Get yarn cache directory
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $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: npx shopify hydrogen deploy --build-command "yarn build"
env:
SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN: "${{ secrets.OXYGEN_DEPLOYMENT_TOKEN_28246038 }}"