File: docs-version.yml

package info (click to toggle)
python-awkward 2.8.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 25,144 kB
  • sloc: python: 182,845; cpp: 33,828; sh: 432; makefile: 21; javascript: 8
file content (39 lines) | stat: -rw-r--r-- 1,065 bytes parent folder | download
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
39
name: Sync Docs Selector

on:
  push:
    branches:
      - main
    paths:
      - docs/switcher.json
  workflow_dispatch:

concurrency:
  group: 'docs-version-${{ github.head_ref || github.run_id }}'
  cancel-in-progress: true

jobs:
  coverage:
    runs-on: ubuntu-22.04
    name: Push version switcher
    permissions:
      id-token: write
      contents: read
    env:
      S3_BUCKET: "awkward-array.org"
      CLOUDFRONT_ID: "EFM4QVENUIXHS"
    environment:
      name: docs
    steps:
      - uses: actions/checkout@v5
      - name: Configure AWS credentials
        uses: aws-actions/configure-aws-credentials@v5
        with:
          aws-region: eu-west-2
          role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ 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"