mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
chore(ci): move doc publishing to its own workflow
This workflow depend on the execution of aws_build.yml when executed on default branch.
This commit is contained in:
2
.github/workflows/aws_build.yml
vendored
2
.github/workflows/aws_build.yml
vendored
@@ -1,5 +1,5 @@
|
||||
# Build on an AWS instance.
|
||||
name: AWS EC2 build
|
||||
name: AwsEc2Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
38
.github/workflows/continuous-integration.yml
vendored
38
.github/workflows/continuous-integration.yml
vendored
@@ -96,44 +96,6 @@ jobs:
|
||||
# Releasing and Testing Packages #
|
||||
##################################
|
||||
|
||||
PublishDoc:
|
||||
needs: [BuildAndTest]
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
if: ${{ github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') }}
|
||||
|
||||
steps:
|
||||
- name: Set env
|
||||
id: vars
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> "${GITHUB_ENV}"
|
||||
- name: Download Documentation
|
||||
id: download
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: html-docs
|
||||
- name: Publish Documentation to S3
|
||||
id: publish
|
||||
if: ${{ steps.download.outcome == 'success' && !cancelled() }}
|
||||
uses: jakejarvis/s3-sync-action@be0c4ab89158cac4278689ebedd8407dd5f35a83
|
||||
with:
|
||||
args: --acl public-read
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ secrets.AWS_PREPROD_REPO_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: '.'
|
||||
DEST_DIR: 'concrete-compiler/${{ env.RELEASE_VERSION }}'
|
||||
- name: Invalidate CloudFront Cache
|
||||
if: ${{ steps.publish.outcome == 'success' }}
|
||||
uses: awact/cloudfront-action@8bcfabc7b4bbc0cb8e55e48527f0e3a6d681627c
|
||||
env:
|
||||
SOURCE_PATH: '/concrete-compiler/*'
|
||||
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_REPO_DOCUMENTATION_DISTRIBUTION_ID }}
|
||||
|
||||
CreateRelease:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [BuildAndTest, BuildAndTestMacOS]
|
||||
|
||||
40
.github/workflows/publish_doc.yml
vendored
Normal file
40
.github/workflows/publish_doc.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Publish documentation
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [AwsEc2Build]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
PublishDoc:
|
||||
runs-on: ubuntu-20.04
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: Download Documentation
|
||||
id: download
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: html-docs
|
||||
- name: Publish Documentation to S3
|
||||
id: publish
|
||||
if: ${{ steps.download.outcome == 'success' && !cancelled() }}
|
||||
uses: jakejarvis/s3-sync-action@be0c4ab89158cac4278689ebedd8407dd5f35a83
|
||||
with:
|
||||
args: --acl public-read
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ secrets.AWS_PREPROD_REPO_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: '.'
|
||||
DEST_DIR: 'concrete-compiler/${{ github.ref_name }}'
|
||||
- name: Invalidate CloudFront Cache
|
||||
if: ${{ steps.publish.outcome == 'success' }}
|
||||
uses: awact/cloudfront-action@8bcfabc7b4bbc0cb8e55e48527f0e3a6d681627c
|
||||
env:
|
||||
SOURCE_PATH: '/concrete-compiler/*'
|
||||
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_REPO_DOCUMENTATION_DISTRIBUTION_ID }}
|
||||
Reference in New Issue
Block a user