Deploy documentation artifacts [main branch] #2
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 documentation artifacts [main branch] | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Release Latest"] | |
branches: [main] | |
types: | |
- completed | |
jobs: | |
deploy: | |
name: Deploy documentation artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Prepare environment | |
uses: ./.github/actions/prepare-environment | |
- name: Lerna bootstrap | |
run: npx lerna bootstrap | |
- name: Prepare directories | |
run: | | |
mkdir -p s3_build | |
- name: Plasma Temple Docs | |
run: | | |
export NODE_OPTIONS=--openssl-legacy-provider | |
npm run build --prefix="./website/plasma-temple-docs" | |
cp -R ./website/plasma-temple-docs/build ./s3_build/temple | |
- name: Plasma Temple Storybook | |
run: | | |
npm run storybook:build --prefix="./packages/plasma-temple" | |
cp -R ./packages/plasma-temple/build-sb ./s3_build/temple-storybook | |
- name: Install s3cmd | |
run: pip3 install s3cmd | |
- name: s3 Upload documentation build | |
run: > | |
s3cmd | |
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }} | |
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
--host ${{ secrets.AWS_ENDPOINT }} | |
--host-bucket ${{ secrets.AWS_ENDPOINT }} | |
--bucket-location ${{ secrets.AWS_REGION }} | |
--signature-v2 | |
--delete-removed | |
--no-mime-magic | |
sync | |
./s3_build/ | |
s3://${{ secrets.AWS_S3_BUCKET }}/current/temple/ |