This repository was archived by the owner on Apr 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Generation of new docs via Github Actions #130
Open
vyrzdev
wants to merge
27
commits into
rossmacarthur:master
Choose a base branch
from
vyrzdev:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
a1976b0
Testing action (Looking at workspace filesystem)
f8ee7e5
Testing action (Fixing invalid branchname)
45f8be4
Testing action (Changed sphinx install method)
9a995f9
Testing action (Sudoing apt)
2add9c2
Testing Action (Changing import of serde for docs conf)
d08a5da
Testing Action (Investigating what directory is being worked in)
fa01a6e
Testing Action (Investigating what directory is being worked in)
035ef57
Testing Action (Trying to get serde to import properly)
aa12d99
Testing Action (Investigating runner file-system more)
729f899
Testing Action (Investigating runner file-system more)
6709f38
Testing Action (Investigating runner file-system more)
d872f36
Testing Action (Trying to make serde package available in PATH)
4ae2996
Testing Action (Trying to make serde package available in PATH)
be4059d
Testing Action (Trying to make serde package available in PYTHONPATH)
c4babb4
Testing Action (Path works -> Testing docs build)
b6b6f7c
Cleaning test files
00c468d
Testing Action: (Full test)
23d2d3f
Testing Action: (testing swap space method)
9782137
Testing Action: (testing swap space method)
7ab581c
Testing Action: (testing swap space method)
723175a
Testing Action: (checking gh-pages branch already in local)
67201d3
Testing Action: (testing git staging)
4e2306a
Testing Action: (Full workflow test)
326828b
Testing Action: (Added fancy version number thing)
bf7a4bc
Silenced fail exit code on no changes
667aa74
Cleaned test imports
47ab0d0
Cleaned accidental added line
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Triggers the workflows on push or pull request events but only for the main branch | ||
| name: Generate new docs. | ||
| on: | ||
| # Allows you to run this workflows manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| # A workflows run is made up of one or more jobs that can run sequentially or in parallel | ||
| jobs: | ||
| # This workflows contains a single job called "build" | ||
| build: | ||
| # The type of runner that the job will run on | ||
| runs-on: ubuntu-latest | ||
|
|
||
| # Steps represent a sequence of tasks that will be executed as part of the job | ||
| steps: | ||
| # Runs a set of commands using the runners shell | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| ref: master | ||
|
Comment on lines
+18
to
+19
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I understand why this is here 🤔. I think it would be assumed that the docs would be built from the branch running the workflow not always from master. |
||
| - uses: extractions/setup-just@v1 | ||
|
|
||
| - name: Run a multi-line script | ||
| run: | | ||
| sudo apt-get install python3-sphinx | ||
| export PYTHONPATH=$GITHUB_WORKSPACE/src:$PYTHONPATH | ||
| just docs | ||
| git config --global user.name "Serde Docs Auto-Generator" | ||
| mkdir ../html_docs_swap_folder | ||
| cp -r docs/_build/html/* ../html_docs_swap_folder/ | ||
| git fetch | ||
| git checkout -t origin/gh-pages | ||
| rm -rf ./* | ||
| cp -r ../html_docs_swap_folder/* ./ | ||
| git add . | ||
| git diff-index --quiet HEAD || git commit -m "publish docs for $(git -C ../../.. rev-parse --short HEAD)" | ||
| git push | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See my comment on the PR about using an action for this |
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if this was just
docs. Same with the file name.