Skip to content

Commit

Permalink
Deploy to GitHub Pages: d9eda6a
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jul 31, 2023
0 parents commit 5b32f0c
Show file tree
Hide file tree
Showing 30 changed files with 4,488 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
target-branch: master
labels:
- dependency_updates
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
target-branch: master
labels:
- CI
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Building GitHub pages (CI)

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest

# Cancel running workflows when additional changes are pushed
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install OPTIMADE
run: |
python -m pip install --upgrade pip
pip install -r make_ghpages/requirements.txt
- name: Make pages
run: cd make_ghpages && python make_pages.py
47 changes: 47 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Building and deploying GitHub pages

on:
# schedule runs _only_ for the default branch (for a repository) and the base branch (for a PR).
# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule for more info.
schedule:
# See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule
# run every day at 05:20 UTC
- cron: "20 5 * * *"

# also update pages on pushes to master
push:
branches:
- master

jobs:
daily_build:
runs-on: ubuntu-latest
env:
COMMIT_AUTHOR: Daily Deploy Action
COMMIT_AUTHOR_EMAIL: [email protected]
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install OPTIMADE
run: |
python -m pip install --upgrade pip
pip install -r make_ghpages/requirements.txt
- name: Make pages
run: cd make_ghpages && python make_pages.py
timeout-minutes: 120

- name: Commit to gh-pages
run: ./make_ghpages/commit.sh

- name: Push changes
uses: ad-m/[email protected]
with:
branch: gh-pages
force: true
github_token: ${{ secrets.GITHUB_TOKEN }}
122 changes: 122 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

*~
.DS_Store

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
.static_storage/
.media/
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# VSCode project settings
.vscode

# mkdocs documentation
/site

# mypy
.mypy_cache/

# pytest
.pytest_cache/

.DS_Store
.idea/

Untitled.ipynb
local_openapi.json
local_index_openapi.json
server.cfg
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
exclude: README.md
- id: check-yaml
- id: check-json

- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
name: Blacken

- repo: https://gitlab.com/pycqa/flake8
rev: '3.9.2'
hooks:
- id: flake8
Loading

0 comments on commit 5b32f0c

Please sign in to comment.