chore: transfer repo
This commit is contained in:
34
.gitea/workflows/deploy-staging.yml
Normal file
34
.gitea/workflows/deploy-staging.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Build and Deploy
|
||||
on: workflow_dispatch
|
||||
|
||||
inputs:
|
||||
user_version:
|
||||
description: 'Custom version (e.g., 1.2.3)'
|
||||
required: true
|
||||
default: '1.0.0'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: sent-shop-vps
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Calculate version
|
||||
id: version
|
||||
run: |
|
||||
SHORT_SHA=$(git rev-parse --short=7 HEAD)
|
||||
APP_VERSION=${{ inputs.user_version }}-${SHORT_SHA}
|
||||
echo "Using version: ${APP_VERSION}"
|
||||
|
||||
- name: Build and deploy
|
||||
env:
|
||||
COMPOSE_PROJECT_NAME: sent-shop # Unique identifier, must be kept not to overwrite other composes.
|
||||
APP_VERSION: ${{ env.APP_VERSION }}
|
||||
SHOPIFY_REVALIDATION_SECRET: ${{ secrets.SHOPIFY_REVALIDATION_SECRET }}
|
||||
SHOPIFY_STOREFRONT_ACCESS_TOKEN: ${{ secrets.SHOPIFY_STOREFRONT_ACCESS_TOKEN }}
|
||||
run: |
|
||||
docker-compose build
|
||||
docker-compose down
|
||||
docker-compose up -d
|
||||
echo "New version is up and running
|
||||
Reference in New Issue
Block a user