-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove GITOPS_TOKEN and use Staffbase/deploy-web-assets
- Loading branch information
Showing
1 changed file
with
39 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,11 @@ on: | |
|
||
env: | ||
NODE_VERSION: 16 | ||
DEPLOYMENT_KIND: widget | ||
DEPLOYMENT_TARGET: weather | ||
DEPLOYMENT_STATIC_FILES: staffbase.user-profile-client.min.js | ||
DEPLOYMENT_SOURCE: samples/weather-forecast/dist | ||
|
||
|
||
jobs: | ||
build-and-deploy: | ||
|
@@ -39,86 +44,74 @@ jobs: | |
mkdir samples/weather-forecast/icons | ||
cp samples/weather-forecast/resources/weather-forecast.svg samples/weather-forecast/dist/icons | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
repository: Staffbase/S3-deployment-action | ||
ref: 1.0.1 | ||
token: ${{ secrets.GITOPS_TOKEN }} | ||
path: .github/gitops | ||
|
||
- name: Publish to S3 DE Prod | ||
if: github.event.release.tag_name != null | ||
uses: ./.github/gitops | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: Staffbase/[email protected] | ||
with: | ||
source: samples/weather-forecast/dist | ||
destination: widgets/weather | ||
|
||
source: ${{ env.DEPLOYMENT_SOURCE }} | ||
target: ${{ env.DEPLOYMENT_TARGET }} | ||
deployment_kind: ${{ env.DEPLOYMENT_KIND }} | ||
# Varnish settings | ||
static_files: | | ||
manifest.json | ||
frontend_host: frontend-cache-main-de1.staffbase.com | ||
static_files: ${{ env.DEPLOYMENT_STATIC_FILES }} | ||
frontend_cache_host: frontend-cache-main-de1.staffbase.com | ||
frontend_cache_password: ${{ secrets.FRONTEND_CACHE_PROD_DE1_PASSWORD }} | ||
|
||
# AWS specific settings | ||
aws_bucket: staffbasestatic-prod-de1 | ||
aws_region: eu-central-1 | ||
aws_access_key: ${{ secrets.PROD_DE1_AWS_ACCESS_KEY_ID }} | ||
aws_secret_key: ${{ secrets.PROD_DE1_AWS_ACCESS_KEY_SECRET }} | ||
aws_access_key_id: ${{ secrets.PROD_DE1_aws_access_key_id_ID }} | ||
aws_access_key_secret: ${{ secrets.PROD_DE1_aws_access_key_id_SECRET }} | ||
|
||
- name: Deploy to S3 US Prod | ||
if: github.event.release.tag_name != null | ||
uses: ./.github/gitops | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: Staffbase/[email protected] | ||
with: | ||
source: samples/weather-forecast/dist | ||
destination: widgets/weather | ||
|
||
source: ${{ env.DEPLOYMENT_SOURCE }} | ||
target: ${{ env.DEPLOYMENT_TARGET }} | ||
deployment_kind: ${{ env.DEPLOYMENT_KIND }} | ||
# Varnish settings | ||
static_files: | | ||
manifest.json | ||
frontend_host: frontend-cache-us1.staffbase.com | ||
static_files: ${{ env.DEPLOYMENT_STATIC_FILES }} | ||
frontend_cache_host: frontend-cache-us1.staffbase.com | ||
frontend_cache_password: ${{ secrets.FRONTEND_CACHE_PROD_US1_PASSWORD }} | ||
|
||
# AWS specific settings | ||
aws_bucket: staffbasestatic-prod-us1 | ||
aws_region: us-east-1 | ||
aws_access_key: ${{ secrets.PROD_US1_AWS_ACCESS_KEY_ID }} | ||
aws_secret_key: ${{ secrets.PROD_US1_AWS_ACCESS_KEY_SECRET }} | ||
aws_access_key_id: ${{ secrets.PROD_US1_aws_access_key_id_ID }} | ||
aws_access_key_secret: ${{ secrets.PROD_US1_aws_access_key_id_SECRET }} | ||
|
||
- name: Publish to S3 DE stage | ||
if: github.ref == 'refs/heads/main' | ||
uses: ./.github/gitops | ||
uses: Staffbase/[email protected] | ||
with: | ||
source: samples/weather-forecast/dist | ||
destination: widgets/weather | ||
|
||
source: ${{ env.DEPLOYMENT_SOURCE }} | ||
target: ${{ env.DEPLOYMENT_TARGET }} | ||
deployment_kind: ${{ env.DEPLOYMENT_KIND }} | ||
# Varnish settings | ||
static_files: | | ||
manifest.json | ||
frontend_host: frontend-cache-de1.staffbase.rocks | ||
static_files: ${{ env.DEPLOYMENT_STATIC_FILES }} | ||
frontend_cache_host: frontend-cache-de1.staffbase.rocks | ||
frontend_cache_password: ${{ secrets.FRONTEND_CACHE_STAGE_DE1_PASSWORD }} | ||
|
||
# AWS specific settings | ||
aws_bucket: staffbasestatic-stage-de1 | ||
aws_region: eu-central-1 | ||
aws_access_key: ${{ secrets.STAGE_DE1_AWS_ACCESS_KEY_ID }} | ||
aws_secret_key: ${{ secrets.STAGE_DE1_AWS_ACCESS_KEY_SECRET }} | ||
aws_access_key_id: ${{ secrets.STAGE_DE1_aws_access_key_id_ID }} | ||
aws_access_key_secret: ${{ secrets.STAGE_DE1_aws_access_key_id_SECRET }} | ||
|
||
- name: Publish to S3 DE dev | ||
if: github.ref == 'refs/heads/dev' | ||
uses: ./.github/gitops | ||
uses: Staffbase/[email protected] | ||
with: | ||
source: samples/weather-forecast/dist | ||
destination: widgets/weather | ||
|
||
source: ${{ env.DEPLOYMENT_SOURCE }} | ||
target: ${{ env.DEPLOYMENT_TARGET }} | ||
deployment_kind: ${{ env.DEPLOYMENT_KIND }} | ||
# Varnish settings | ||
static_files: | | ||
manifest.json | ||
frontend_host: frontend-cache-de1.staffbase.dev | ||
static_files: ${{ env.DEPLOYMENT_STATIC_FILES }} | ||
frontend_cache_host: frontend-cache-de1.staffbase.dev | ||
frontend_cache_password: ${{ secrets.FRONTEND_CACHE_DEV_DE1_PASSWORD }} | ||
|
||
# AWS specific settings | ||
aws_bucket: staffbasestatic-dev-de1 | ||
aws_region: eu-central-1 | ||
aws_access_key: ${{ secrets.DEV_DE1_AWS_ACCESS_KEY_ID }} | ||
aws_secret_key: ${{ secrets.DEV_DE1_AWS_ACCESS_KEY_SECRET }} | ||
aws_access_key_id: ${{ secrets.DEV_DE1_aws_access_key_id_ID }} | ||
aws_access_key_secret: ${{ secrets.DEV_DE1_aws_access_key_id_SECRET }} |