Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Feb 10, 2024
1 parent 2758eb3 commit 783c6c1
Show file tree
Hide file tree
Showing 20 changed files with 300 additions and 356 deletions.
90 changes: 69 additions & 21 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,76 @@
name: "Build documentation"
name: Build documentation

on:
push:
branches:
- main
workflow_dispatch:

jobs:
docs:
name: "Build and deploy"
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"

- uses: actions/upload-artifact@v3
with:
name: documentation-html
path: docs/_build/html/

- uses: shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.PALEWIRE_DOCS_AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.PALEWIRE_DOCS_AWS_SECRET_ACCESS_KEY }}
aws_bucket: ${{ secrets.PALEWIRE_DOCS_AWS_BUCKET }}
source_dir: docs/_build/html/
destination_dir: first-pull-request
- id: checkout
name: Checkout
uses: actions/checkout@v4

- id: setup-python
name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pipenv'

- id: install-pipenv
name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
shell: bash

- id: install-python-dependencies
name: Install Python dependencies
run: pipenv sync --dev
shell: bash

- id: build-sphinx-documentation
name: Build Sphinx documentation
run: pipenv run sphinx-build -b html ./docs _build
shell: bash

- id: upload-release-candidate
name: Upload release candidate
uses: actions/upload-artifact@v4
with:
name: release-candidate
path: docs/

deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
if: ${{ github.ref_name == 'main' }}
steps:
- name: Download release candidate
uses: actions/download-artifact@v4
with:
name: release-candidate
path: ./docs/

- id: configure-aws
name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.PALEWIRE_DOCS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PALEWIRE_DOCS_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- id: upload-to-s3
name: Upload documentation to Amazon S3
uses: datadesk/delivery-deploy-action@v1
with:
bucket: ${{ secrets.PALEWIRE_DOCS_AWS_BUCKET }}
base-path: first-pull-request
dir: ./docs/
should-cache: false
use-accelerate-endpoint: false
public: true
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ myst-parser = "*"
[dev-packages]

[requires]
python_version = "3.10"
python_version = "3.11"
423 changes: 227 additions & 196 deletions Pipfile.lock

Large diffs are not rendered by default.

48 changes: 0 additions & 48 deletions docs/_templates/nav.html

This file was deleted.

3 changes: 0 additions & 3 deletions docs/actions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# Actions

Once your commit is merged into the original repository, that will trigger an update to the moneyinpolitics.wtf website via GitHub Actions.
Expand Down
3 changes: 0 additions & 3 deletions docs/commits.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# Commits

Once you're confident in your transcription, the next step is to save your work using another version control technique: the commit.
Expand Down
17 changes: 3 additions & 14 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,26 @@
extensions = [
"myst_parser",
]
templates_path = ["_templates"]
source_suffix = ".rst"
source_suffix = ".md"
master_doc = "index"
html_extra_path = []

project = "First Pull Request"
year = datetime.now().year
copyright = f"{year} Ben Welsh"
copyright = f"{year} palewire"

exclude_patterns = ["_build"]

html_theme = "alabaster"
html_theme = "palewire"
html_sidebars = {
"**": [
"about.html",
"navigation.html",
"relations.html",
"searchbox.html",
"donate.html",
]
}
html_theme_options = {
"canonical_url": f"https://palewi.re/docs/first-pull-request/",
"show_powered_by": False,
"show_relbar_bottom": True,
}

html_static_path = ["_static"]
html_css_files = [
"css/custom.css",
]
html_js_files = []

pygments_style = "sphinx"
3 changes: 0 additions & 3 deletions docs/edits.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# Edits

When you arrive on the YAML page, you should see that the `is_use` attribute on the first defintion contains only a single entry.
Expand Down
3 changes: 0 additions & 3 deletions docs/end.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# The end

Visit [moneyinpolitics.wtf](https://moneyinpolitics.wtf) in your browser and navigate to the page for your definition.
Expand Down
3 changes: 0 additions & 3 deletions docs/forks.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# Forks

A fork is a copy of a repository that belongs to someone else. When you fork a repository, you create a personal copy of the original that belongs to you.
Expand Down
3 changes: 0 additions & 3 deletions docs/framework.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# The framework

When you land on [github.com/palewire/moneyinpolitics.wtf](https://github.com/palewire/moneyinpolitics.wtf), you'll see that the repository is already populated with an array of folders and files. This is the code that powers [moneyinpolitics.wtf](https://moneyinpolitics.wtf) by providing the HTML layout, its cosmetic style and, most important, its content.
Expand Down
3 changes: 0 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# First Pull Request

How to propose changes to open-source software using GitHub [pull requests](https://docs.github.com/en/pull-requests)
Expand Down
3 changes: 0 additions & 3 deletions docs/issues.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# Issues

GitHub’s issue tracker is a way to track tasks, enhancements and bugs. Each issue has its own page where you can provide details about the problem or idea, and where others can contribute to the discussion. You can use labels and milestones to organize your issues and track their progress.
Expand Down
35 changes: 0 additions & 35 deletions docs/make.bat

This file was deleted.

3 changes: 0 additions & 3 deletions docs/merges.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# Merges

When a maintainer receives a pull request on GitHub, they should first review the changes that were proposed.
Expand Down
3 changes: 0 additions & 3 deletions docs/mission.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# What you will do

If you complete this class, you will gain a basic understanding of how to submit an open-source software patch on [github.com](https://github.com), the leading code-management site.
Expand Down
3 changes: 0 additions & 3 deletions docs/pullrequests.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# Pull requests

When you commit to a fork, GitHub presumes you're interested in proposing a change to the original repository. To make life easier, it automatically offers the opportunity to "Compare & pull request" in a green button at the top of the page.
Expand Down
3 changes: 0 additions & 3 deletions docs/repo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# Repositories

A repository is a place where you can store and manage your code. It's like a digital folder where you put all the files related to a specific project, and share them with others, if you want to.
Expand Down
2 changes: 0 additions & 2 deletions docs/requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions docs/yaml.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
```{include} _templates/nav.html
```

# YAML

Once you've entered the [dictionary folder](https://github.com/palewire/moneyinpolitics.wtf/tree/main/_data/dictionary), you should see a list of files. Each one contains a word's definition, along with other metadata describing it like whether it is a noun or a verb.
Expand Down

0 comments on commit 783c6c1

Please sign in to comment.