Skip to content

Commit

Permalink
ci: fix deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Dec 16, 2022
1 parent 7e6f504 commit 9ab248c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,12 @@ jobs:
- name: Sync `release`
if: github.event_name == 'release'
run: |
# Take only leading version
version=$(echo "${GITHUB_REF_NAME}" | sed -n -E "s/([0-9]+\.[0-9]+)\.[0-9]+/\1/p")
aws s3 cp docs/switcher.json "s3://${S3_BUCKET}/doc/"
aws s3 sync built-docs/ "s3://${S3_BUCKET}/doc/${GITHUB_REF_NAME:1}/"
aws s3 sync built-docs/ "s3://${S3_BUCKET}/doc/$version/"
aws cloudfront create-invalidation --distribution-id "${CLOUDFRONT_ID}" \
--paths /"doc/${GITHUB_REF_NAME:1}" "docs/switcher.json"
--paths "/doc/$version/" "/doc/switcher.json"
deploy-docs:
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 9ab248c

Please sign in to comment.