Skip to content

Commit

Permalink
Deploy to GitHub Pages: 7d17837
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 26, 2024
0 parents commit 444e1b0
Show file tree
Hide file tree
Showing 33 changed files with 13,669 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: monthly
target-branch: master
labels:
- dependency_updates
groups:
python-dependencies:
applies-to: version-updates
dependency-type: production
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
target-branch: master
labels:
- CI
groups:
github-actions:
applies-to: version-updates
dependency-type: production
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@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11

- 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: action@github.com
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- 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/github-push-action@v0.8.0
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.6.0
hooks:
- id: trailing-whitespace
exclude: README.md
- id: check-yaml
- id: check-json

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

- repo: https://github.com/pycqa/flake8
rev: '7.0.0'
hooks:
- id: flake8
Loading

0 comments on commit 444e1b0

Please sign in to comment.