forked from scikit-hep/awkward
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1001 Bytes
/
docs-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Sync Docs Selector
on:
push:
branches:
- main
paths:
- docs/switcher.json
concurrency:
group: 'docs-version-${{ github.head_ref || github.run_id }}'
cancel-in-progress: true
jobs:
coverage:
runs-on: ubuntu-20.04
name: Push version switcher
permissions:
id-token: write
contents: read
env:
S3_BUCKET: "awkward-array.org"
CLOUDFRONT_ID: "EFM4QVENUIXHS"
environment:
name: docs-prod
steps:
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE }}
# Pushes to main trigger latest
- name: Push version selector
run: |
aws s3 cp docs/switcher.json "s3://${S3_BUCKET}/doc/switcher.json"
aws cloudfront create-invalidation --distribution-id "${CLOUDFRONT_ID}" \
--paths "/doc/switcher.json"