Skip to content

Commit

Permalink
Remove prev_source step from tagged docs workflow. Rename workflows. …
Browse files Browse the repository at this point in the history
…Add README for prev_source.
  • Loading branch information
leehart committed Sep 29, 2023
1 parent 8a913d5 commit 7d3d45f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: save_tagged_docs
name: add_tagged_docs
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
save_tagged_docs:
add_tagged_docs:
runs-on: ubuntu-latest
steps:
# Remove the prefix "refs/*/" from $GITHUB_REF
Expand All @@ -22,6 +22,9 @@ jobs:
with:
ref: ${{ env.VERSION_TAG }}

- name: Check out new branch
run: git checkout -b auto_add_tagged_docs_${{ env.VERSION_TAG }}

- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -53,13 +56,5 @@ jobs:
env:
VERSION_TAG: ${{ env.VERSION_TAG }}

- name: Record source & config in prev_source dir
run: |
mkdir -p docs/prev_source/$VERSION_TAG
mv docs/source/*.rst docs/prev_source/$VERSION_TAG/
mv docs/source/conf.py docs/prev_source/$VERSION_TAG/
env:
VERSION_TAG: ${{ env.VERSION_TAG }}

- name: Eyeball the Git status
run: git status
run: git status -u
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: docs
name: deploy_docs
on:
push:
branches:
- main
jobs:
docs:
deploy_docs:
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
3 changes: 3 additions & 0 deletions docs/prev_source/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This `docs/prev_source` directory is for RST and `conf.py` "source" files that were used to **manually** build versions of documentation for the `docs/extra` directory.

The RST and `conf.py` "source" files for versions of documentation that were built **automatically** via GitHub Action workflows (e.g. after pushing a new release version tag) do not need to be stored in `docs/prev_source` directory because they will be available via the Git history.

0 comments on commit 7d3d45f

Please sign in to comment.