-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1058feb
commit 79822ab
Showing
3 changed files
with
110 additions
and
110 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 |
---|---|---|
@@ -1,61 +1,61 @@ | ||
name: Deploy Production | ||
|
||
on: | ||
push: | ||
branches: | ||
- release/production | ||
|
||
jobs: | ||
build: | ||
name: Build Images | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Gcloud Auth | ||
uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: "${{ secrets.ORG_PRODUCTION_IMAGES_PUSH }}" | ||
|
||
- name: Setup Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v1 | ||
|
||
- name: Set Image Tag | ||
id: lookup | ||
run: echo "version=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
|
||
- run: | | ||
gcloud auth list | ||
gcloud auth configure-docker -q | ||
echo "VERSION: ${{ steps.lookup.outputs.version }}" | ||
- name: Build and Push Images | ||
run: | | ||
./k8s/build-img.py -p production | ||
env: | ||
BACKEND_URL: ${{ secrets.NEXT_PUBLIC_BACKEND_URL }} | ||
NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID }} | ||
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }} | ||
NEXT_PUBLIC_ALGOLIA_API_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_API_KEY }} | ||
NEXT_PUBLIC_ALGOLIA_INDEX: ${{ secrets.NEXT_PUBLIC_ALGOLIA_INDEX }} | ||
NEWSLETTER_BASE_URL: ${{ secrets.NEWSLETTER_BASE_URL }} | ||
SENDER_TOKEN: ${{ secrets.SENDER_TOKEN }} | ||
|
||
- name: Trigger Image Update | ||
run: | | ||
curl -H "Accept: application/vnd.github.everest-preview+json" \ | ||
-H "Authorization: token ${{ secrets.ORG_DISPATCH_RENDER_TOKEN }}" \ | ||
--request POST \ | ||
--data '{"event_type": "docs-build", "client_payload": {"image": "${{ env.IMAGE }}", "image_path": "${{ env.IMAGE_PATH }}", "key_path": "${{ env.KEY_PATH }}", "tag": "${{ env.TAG }}", "commit_message_service": "${{ env.SERVICE_NAME }}"}}' \ | ||
${{ env.TARGET_REPO }} | ||
env: | ||
IMAGE: gcr.io/fetch-ai-images/docs-website | ||
KEY_PATH: ".website.image.tag" | ||
TAG: ${{ steps.lookup.outputs.version }} | ||
IMAGE_PATH: values | ||
SERVICE_NAME: Documentation | ||
TARGET_REPO: https://api.github.com/repos/fetchai/infra-production-deployment/dispatches | ||
# name: Deploy Production | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - release/production | ||
|
||
# jobs: | ||
# build: | ||
# name: Build Images | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# fetch-depth: 0 | ||
|
||
# - name: Setup Gcloud Auth | ||
# uses: google-github-actions/auth@v1 | ||
# with: | ||
# credentials_json: "${{ secrets.ORG_PRODUCTION_IMAGES_PUSH }}" | ||
|
||
# - name: Setup Cloud SDK | ||
# uses: google-github-actions/setup-gcloud@v1 | ||
|
||
# - name: Set Image Tag | ||
# id: lookup | ||
# run: echo "version=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
|
||
# - run: | | ||
# gcloud auth list | ||
# gcloud auth configure-docker -q | ||
# echo "VERSION: ${{ steps.lookup.outputs.version }}" | ||
|
||
# - name: Build and Push Images | ||
# run: | | ||
# ./k8s/build-img.py -p production | ||
# env: | ||
# BACKEND_URL: ${{ secrets.NEXT_PUBLIC_BACKEND_URL }} | ||
# NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID }} | ||
# NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }} | ||
# NEXT_PUBLIC_ALGOLIA_API_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_API_KEY }} | ||
# NEXT_PUBLIC_ALGOLIA_INDEX: ${{ secrets.NEXT_PUBLIC_ALGOLIA_INDEX }} | ||
# NEWSLETTER_BASE_URL: ${{ secrets.NEWSLETTER_BASE_URL }} | ||
# SENDER_TOKEN: ${{ secrets.SENDER_TOKEN }} | ||
|
||
# - name: Trigger Image Update | ||
# run: | | ||
# curl -H "Accept: application/vnd.github.everest-preview+json" \ | ||
# -H "Authorization: token ${{ secrets.ORG_DISPATCH_RENDER_TOKEN }}" \ | ||
# --request POST \ | ||
# --data '{"event_type": "docs-build", "client_payload": {"image": "${{ env.IMAGE }}", "image_path": "${{ env.IMAGE_PATH }}", "key_path": "${{ env.KEY_PATH }}", "tag": "${{ env.TAG }}", "commit_message_service": "${{ env.SERVICE_NAME }}"}}' \ | ||
# ${{ env.TARGET_REPO }} | ||
# env: | ||
# IMAGE: gcr.io/fetch-ai-images/docs-website | ||
# KEY_PATH: ".website.image.tag" | ||
# TAG: ${{ steps.lookup.outputs.version }} | ||
# IMAGE_PATH: values | ||
# SERVICE_NAME: Documentation | ||
# TARGET_REPO: https://api.github.com/repos/fetchai/infra-production-deployment/dispatches |
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
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
pull_request_target: | ||
types: | ||
- opened | ||
- editedgit | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
|