修改右侧浮动窗口商务咨询QR码 #221
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/staging.yml | |
# | |
# GitHub Action for Serverless NextJS staging environment | |
# | |
name: Deploy prod-steedos-website | |
on: | |
push: | |
tags: # Deploy tag (e.g. v1.0) to production | |
- 'v**' | |
jobs: | |
deploy-staging: | |
runs-on: ubuntu-latest | |
environment: prod | |
env: | |
STEEDOS_SERVER_API_KEY: ${{ secrets.STEEDOS_SERVER_API_KEY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
NEXT_PUBLIC_DEPLOYMENT_URL: https://www.steedos.com | |
NEXT_PUBLIC_STEEDOS_ROOT_URL: https://console.steedos.cn | |
NEXT_STATIC_PROPS_REVALIDATE: 3600 | |
KEYCLOAK_ID: www.steedos.cn | |
KEYCLOAK_SECRET: ${{ secrets.KEYCLOAK_SECRET }} | |
KEYCLOAK_ISSUER: https://id.steedos.cn/realms/master | |
NEXT_PUBLIC_NEXTAUTH_PROVIDER_ID: keycloak | |
NEXTAUTH_URL: https://www.steedos.com | |
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | |
STEEDOS_IDENTITY_JWT_SECRET: ${{ secrets.STEEDOS_IDENTITY_JWT_SECRET }} | |
steps: | |
- uses: actions/checkout@v2 | |
# - name: Configure AWS Credentials | |
# uses: aws-actions/configure-aws-credentials@v1 | |
# with: | |
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# aws-region: ap-east-1 | |
- name: Download `.serverless` state from S3 | |
run: aws s3 sync s3://steedos-serverless-state-bucket/steedos.com.cn/prod/.serverless .serverless --delete --region ap-east-1 | |
- uses: canastro/copy-file-action@master | |
with: | |
source: 'serverless-prod.yml' | |
target: 'serverless.yml' | |
- name: Use Node.js '14' | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
cache: "yarn" | |
- run: yarn --frozen-lockfile | |
- name: Serverless AWS authentication | |
run: npx [email protected] --component=serverless-next config credentials --provider aws --key ${{ secrets.AWS_ACCESS_KEY_ID }} --secret ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Deploy to AWS | |
run: npx [email protected] | |
- name: Upload `.serverless` state to S3 | |
run: aws s3 sync .serverless s3://steedos-serverless-state-bucket/steedos.com.cn/prod/.serverless --delete --region ap-east-1 | |
# build-algolia: | |
# runs-on: ubuntu-latest | |
# needs: deploy-staging | |
# env: | |
# ALGOLIA_APP_ID: TL0K9Y2YIH | |
# ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }} | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Build algolia | |
# uses: darrenjennings/algolia-docsearch-action@master | |
# with: | |
# algolia_application_id: 'TL0K9Y2YIH' | |
# algolia_api_key: ${{ secrets.ALGOLIA_ADMIN_API_KEY }} | |
# file: 'docsearch-config.json' |