GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — dry-python.github.io/tasks.py at develop · dry-python/dry-python.github.io

Expand file tree

/

tasks.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
40 lines (33 loc) · 1.12 KB
/

tasks.py

Copy path

File metadata and controls

40 lines (33 loc) · 1.12 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
from os import environ
from os import getcwd
from os.path import join
from invoke import task
@task
def lint(c):
c.run("poetry run pre-commit run -a")
c.run("poetry run python -m mddoctest")
c.run("poetry run flake8 .")
c.run("poetry run yamllint --strict .")
c.run("npx stylelint --ignore-path .gitignore '**/*.css'")
c.run("npx eslint --ext .js --ignore-path .gitignore .")
c.run("npx remark --frail .")
c.run("npx pug-lint **/*.pug")
c.run("vale '--glob=*.md' docs")
@task
def build(c):
c.run("poetry run mkdocs build")
c.run("npx webpack")
@task
def deploy(c):
config_path = join(getcwd(), ".git", "config")
cred_path = join(getcwd(), ".git", "credentials")
with open(config_path, "a") as f:
f.write("[credential]\n")
f.write(f"helper = store --file {cred_path}\n")
with open(cred_path, "w") as f:
f.write("https://")
f.write(environ["GIT_COMMITTER_NAME"])
f.write(":")
f.write(environ["GIT_COMMITTER_PASSWORD"])
f.write("@github.com\n")
c.run("poetry run ghp-import --cname dry-python.org --branch master --push site")
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.