saleor-dashboard/.github/workflows/deploy-demo.yaml
Lukasz Ostrowski e06d3bdf0d
Improve dashboard and marketplace connection (#2666)
* Change env variables related to marketplace, add navigation item

* Change apps order

* Add button to browse marketplace

* Add redirect to Saleor Apps Marketplace on button click

* Move apps tabs state to URL

* Pass theme for initial marketplace iframe load

* Improve marketplace mount

* fix types

* fix cr

* Update env variables to disable marketplace on envs other than master staging

* Extract locales

* update snapshots
2022-11-30 17:20:20 +01:00

60 lines
No EOL
2.2 KiB
YAML

name: Deploy to demo
on:
repository_dispatch:
types: demo-deployment
jobs:
build:
runs-on: ubuntu-20.04
env:
API_URI: /graphql/
APP_MOUNT_URI: /dashboard/
STATIC_URL: /dashboard/static/
SENTRY_ORG: saleor
SENTRY_PROJECT: dashboard
SENTRY_URL_PREFIX: "~/dashboard/static"
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# Disable preview when new Marketplace features are in progress.
# If marketplace is done till next release this can be easily enabled
# MARKETPLACE_URL: "https://apps.saleor.io/"
# SALEOR_APPS_PAGE_PATH=saleor-apps
# SALEOR_APPS_JSON_PATH=api/saleor-apps
# APP_TEMPLATE_GALLERY_PATH=template-gallery
ENVIRONMENT: demo
DEMO_MODE: true
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.ref }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Package
timeout-minutes: 15
run: |
npm ci
- name: Build
run: |
npm run build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_DASHBOARD_PROD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_DASHBOARD_PROD_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy
run: |
aws s3 sync build/dashboard s3://${{ secrets.AWS_DEMO_DEPLOYMENT_BUCKET }}/dashboard/static/
aws s3 cp build/dashboard/index.html s3://${{ secrets.AWS_DEMO_DEPLOYMENT_BUCKET }}/dashboard/
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DEMO_CF_DIST_ID }} --paths "/dashboard*"
- name: Notify Slack
if: ${{ always() }}
env:
JOB_DEPLOYMENT_KIND: production
JOB_STATUS: ${{ job.status }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLOUD_DEPLOYMENTS_WEBHOOK_URL }}
JOB_TITLE: "Dashboard deployment to ${{ env.ENVIRONMENT }}"
run: |
python3 ./.github/workflows/notify/notify-slack.py