summaryrefslogtreecommitdiff
path: root/.github/workflows/create_website_pr.yml
blob: 79a6c68a756e3ba4deed893e1b542dacb68f3d58 (plain)
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
40
name: Update CircuitPython.org

on:
  release:
    types: [published]

jobs:
  website:
    runs-on: ubuntu-latest
    steps:
    - name: Dump GitHub context
      env:
        GITHUB_CONTEXT: ${{ toJson(github) }}
      run: echo "$GITHUB_CONTEXT"
    - name: Set up Python 3.8
      uses: actions/setup-python@v1
      with:
        python-version: 3.8
    - name: Install deps
      run: |
        pip install requests sh click
    - name: Versions
      run: |
        gcc --version
        python3 --version
    - uses: actions/checkout@v2
      with:
        submodules: true
        fetch-depth: 0
    - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
    - run: git submodule foreach git fetch --recurse-submodules=no origin +refs/tags/*:refs/tags/*
    - name: CircuitPython version
      run: git describe --dirty --tags
    - name: Website
      run: python3 build_board_info.py
      working-directory: tools
      env:
        RELEASE_TAG: ${{ github.event.release.tag_name }}
        ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.BLINKA_GITHUB_ACCESS_TOKEN }}
      if: github.event_name == 'release' && (github.event.action == 'published'  || github.event.action == 'rerequested')