Skip to content

Add CLA (#2474)

Add CLA (#2474) #3466

# This Action is responsible for deploying the default Hydrogen template to Oxygen.
# It is split out from deployments.yml because Oxygen checks for the presence of this specific workflow in the repo.
# TODO: Merge the workflow if/when Oxygen is more lenient.
# Don't change the line below!
#! oxygen_storefront_id: 9928760
name: Oxygen Deployment
on:
workflow_dispatch:
push:
jobs:
deploy_oxygen:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'shopify' }}
name: Deploy to Oxygen
steps:
- name: Check out the code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'
- name: Install the packages
run: yarn install --frozen-lockfile --ignore-engines
- name: Build Hydrogen
run: yarn workspace @shopify/hydrogen build
- name: Build and Publish to Oxygen
id: deploy
uses: shopify/oxygenctl-action@v4
with:
path: ./templates/demo-store
oxygen_deployment_token: ${{ secrets.OXYGEN_DEPLOYMENT_TOKEN_9928760 }}
build_command: 'HYDROGEN_ASSET_BASE_URL=$OXYGEN_ASSET_BASE_URL yarn build'
# Hardcode message and timestamp if manual dispatch
commit_message: ${{ github.event.head_commit.message || 'Manual deployment' }}
commit_timestamp: ${{ github.event.head_commit.timestamp || github.event.repository.updated_at }}
oxygen_health_check: true
- name: Create GitHub Deployment
uses: shopify/github-deployment-action@v1
if: always()
with:
token: ${{ github.token }}
environment: 'preview'
preview_url: ${{ steps.deploy.outputs.url }}
description: ${{ github.event.head_commit.message }}