mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
chore(ci): implement publishing docs to hdk.zama.ai on push to main
This commit is contained in:
56
.github/workflows/continuous-integration.yaml
vendored
56
.github/workflows/continuous-integration.yaml
vendored
@@ -1,6 +1,9 @@
|
||||
name: hdk PR checks
|
||||
|
||||
on: [pull_request]
|
||||
name: HDK CI Pipeline
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -104,3 +107,50 @@ jobs:
|
||||
SLACK_MESSAGE: 'Build finished with status ${{ job.status }}'
|
||||
SLACK_USERNAME: zama-bot
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
|
||||
publish-docs:
|
||||
needs: [build]
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
if: ${{ github.event_name == 'push' && github.base_ref == 'main' }}
|
||||
|
||||
steps:
|
||||
- name: Download Documentation
|
||||
id: download
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: html-docs
|
||||
|
||||
- name: Publish Documentation to S3
|
||||
id: publish
|
||||
if: ${{ steps.download.outcome == 'success' && !cancelled() }}
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --delete
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ secrets.AWS_HDK_DOCUMENTATION_BUCKET_NAME }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: ${{ secrets.AWS_REGION }}
|
||||
SOURCE_DIR: '.'
|
||||
|
||||
- name: Invalidate CloudFront Cache
|
||||
if: ${{ steps.publish.outcome == 'success' }}
|
||||
uses: awact/cloudfront-action@master
|
||||
env:
|
||||
SOURCE_PATH: '/*'
|
||||
AWS_REGION: ${{ secrets.AWS_REGION }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
DISTRIBUTION_ID: ${{ secrets.AWS_HDK_DOCUMENTATION_DISTRIBUTION_ID }}
|
||||
|
||||
- name: Slack Notification
|
||||
if: ${{ always() }}
|
||||
uses: rtCamp/action-slack-notify@v2
|
||||
env:
|
||||
SLACK_CHANNEL: hdk-updates
|
||||
SLACK_ICON: https://pbs.twimg.com/profile_images/1274014582265298945/OjBKP9kn_400x400.png
|
||||
SLACK_COLOR: ${{ job.status }}
|
||||
SLACK_MESSAGE: 'Publishing documentation finished with status ${{ job.status }}'
|
||||
SLACK_USERNAME: zama-bot
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
|
||||
Reference in New Issue
Block a user