Merge branch 'feat/upload_to_cdn' into develop #1
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
name: Deploy to k8s | |
on: | |
push: | |
branches: | |
- develop | |
env: | |
ILLA_GOOGLE_MAP_KEY: ${{ secrets.ILLA_GOOGLE_MAP_KEY }} | |
ILLA_MIXPANEL_API_KEY: ${{ secrets.ILLA_MIXPANEL_API_KEY }} | |
ILLA_AMPLITUDE_API_KEY: ${{ secrets.ILLA_AMPLITUDE_API_KEY }} | |
ILLA_MUI_LICENSE: ${{ secrets.ILLA_MUI_LICENSE }} | |
ILLA_SENTRY_AUTH_TOKEN: ${{ secrets.ILLA_SENTRY_AUTH_TOKEN }} | |
DO_CLUSTER: ${{ secrets.DO_CLUSTER }} | |
DOCKER_LOGIN: ${{ secrets.DOCKER_LOGIN }} | |
DOCKER_PWD: ${{ secrets.DOCKER_PWD }} | |
jobs: | |
build: | |
name: Build website | |
runs-on: ubuntu-latest | |
environment: | |
name: test-cdn | |
env: | |
ILLA_API_BASE_URL: ${{ vars.ILLA_API_BASE_URL }} | |
ILLA_APP_ENV: ${{ vars.ILLA_APP_ENV }} | |
ILLA_BUILDER_URL: ${{ vars.ILLA_BUILDER_URL }} | |
ILLA_CLOUD_URL: ${{ vars.ILLA_CLOUD_URL }} | |
ILLA_MARKET_URL: ${{ vars.ILLA_MARKET_URL }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.12.1 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8.7.0 | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build website | |
run: | | |
echo "Building for $GITHUB_REF_NAME branch,ILLA APP ENV is $ILLA_APP_ENV" | |
pnpm build-cloud | |
- name: Deploy to DigitalOcean Spaces | |
uses: s3-actions/[email protected] | |
with: | |
args: | |
--acl public-read --follow-symlinks --delete --cache-control | |
"public, max-age=31536000" | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.DO_SPACES_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.DO_SPACES_SECRET }} | |
AWS_REGION: "sfo3" | |
S3_BUCKET: ${{ secrets.DO_SPACES_BUCKET }} | |
SOURCE_DIR: "./apps/builder/dist" |