Skip to content

3.5.2

3.5.2 #27

Workflow file for this run

name: Deployment
on:
release:
types: [ published ]
permissions:
contents: read
jobs:
docs:
name: Documentation Deployment
if: github.event.release.prerelease != true
runs-on: ubuntu-latest
steps:
- name: Dispatch event to openhab-docs repository
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.DOCS_REPO_ACCESS_TOKEN }}
repository: openhab/openhab-docs
event-type: update-openhab-alexa-docs-event
client-payload: '{"ref": "${{ github.ref }}"}'
skill:
name: Skill Deployment
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
cache-dependency-path: lambda/package-lock.json
- name: Install ASK CLI
run: npm install -g ask-cli
- name: Generate deployment config
run: node .github/scripts/generateDeployConfig.js
env:
DEPLOY_ENV: ${{ github.event.release.prerelease && 'development' || 'live' }}
FUNCTION_NAME: openhab-alexa
LOG_LEVEL: ${{ github.event.release.prerelease && 'info' || 'error' }}
OPENHAB_BASE_URL: https://myopenhab.org
RELEASE_VERSION: ${{ github.event.release.tag_name }}
SKILL_ID: ${{ secrets.SKILL_ID }}
S3_BUCKET_NA: ${{ secrets.S3_BUCKET_NA }}
S3_BUCKET_EU: ${{ secrets.S3_BUCKET_EU }}
S3_BUCKET_FE: ${{ secrets.S3_BUCKET_FE }}
STACK_ID_NA: ${{ secrets.STACK_ID_NA }}
STACK_ID_EU: ${{ secrets.STACK_ID_EU }}
STACK_ID_FE: ${{ secrets.STACK_ID_FE }}
TESTING_USERNAME: ${{ secrets.TESTING_USERNAME }}
TESTING_PASSWORD: ${{ secrets.TESTING_PASSWORD }}
- name: Deploy skill and AWS resources
run: ask deploy
env:
ASK_ACCESS_TOKEN: ${{ secrets.ASK_ACCESS_TOKEN }}
ASK_REFRESH_TOKEN: ${{ secrets.ASK_REFRESH_TOKEN }}
ASK_VENDOR_ID: ${{ secrets.ASK_VENDOR_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Submit skill for certification
if: github.event.release.prerelease != true
run: node .github/scripts/submitSkillForCertification.js
env:
ASK_ACCESS_TOKEN: ${{ secrets.ASK_ACCESS_TOKEN }}
ASK_REFRESH_TOKEN: ${{ secrets.ASK_REFRESH_TOKEN }}
ASK_VENDOR_ID: ${{ secrets.ASK_VENDOR_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
RELEASE_VERSION: ${{ github.event.release.tag_name }}
SKILL_ID: ${{ secrets.SKILL_ID }}