circuitpython/.github/workflows/create_website_pr.yml
Jeff Epler f817bfe3c6 switch to checkout@v2 with submodules and fetch-depth 0
In order to get tags, including in submodules, we use our own fetching
procedure on top of checkout@v2.

A problem occuring in about 1% of jobs was that some submodules inexplicably
did not have an "origin" remote configured.  "git submodule sync"
configures the "origin" remote in those cases.  No cause for the problem
was determined.

Besides keeping up to date on actions/checkout, @v2 is supposed to fix a bug
where "re-run" of a pull request would fail checking out the code.
2020-04-11 17:29:07 -05:00

41 lines
1.2 KiB
YAML

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')