Skip to content

Commit

Permalink
Adding github acctions
Browse files Browse the repository at this point in the history
  • Loading branch information
iortizdeluzu committed Sep 27, 2023
0 parents commit 11e0e7f
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/deploy_webpage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: actions
run-name: Deploy docs
on: [push]

jobs:
build:
runs-on: ubuntu-latest
env:
SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_SSH_USER: ${{ secrets.REMOTE_SSH_USER }}
REMOTE_IP: ${{ secrets.REMOTE_IP }}

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Install dependencies
run: |
sudo apt install sshpass
pip install virtualenv
virtualenv mkdocs
source mkdocs/bin/activate
pip install -r requirements.txt
pip install --upgrade --force-reinstall mkdocs-material
- name: Create public and private SSH keys
run: |
mkdir ~/.ssh
echo "$SSH_PUBLIC_KEY" > ~/.ssh/id_rsa.pub
echo "$SSH_PRIVATE_KEY" | base64 --decode > ~/.ssh/id_rsa
chmod 0600 ~/.ssh/id_rsa
chmod 0644 ~/.ssh/id_rsa.pub
- name: Build documentation
run: |
./mkdocs/bin/mkdocs build
- name: Deploy to gh-pages branch
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Introduction

Introduction to software course goes here.
59 changes: 59 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: hyperion-docs
channels:
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=5.1=1_gnu
- bzip2=1.0.8=h7b6447c_0
- ca-certificates=2023.01.10=h06a4308_0
- certifi=2022.12.7=py310h06a4308_0
- ld_impl_linux-64=2.38=h1181459_1
- libffi=3.4.2=h6a678d5_6
- libgcc-ng=11.2.0=h1234567_1
- libgomp=11.2.0=h1234567_1
- libstdcxx-ng=11.2.0=h1234567_1
- libuuid=1.41.5=h5eee18b_0
- ncurses=6.4=h6a678d5_0
- openssl=1.1.1s=h7f8727e_0
- pip=22.3.1=py310h06a4308_0
- python=3.10.9=h7a1cb2a_0
- readline=8.2=h5eee18b_0
- setuptools=65.6.3=py310h06a4308_0
- sqlite=3.40.1=h5082296_0
- tk=8.6.12=h1ccaba5_0
- tzdata=2022g=h04d1e81_0
- wheel=0.37.1=pyhd3eb1b0_0
- xz=5.2.10=h5eee18b_1
- zlib=1.2.13=h5eee18b_0
- pip:
- charset-normalizer==3.0.1
- click==8.1.3
- colorama==0.4.6
- csscompressor==0.9.5
- ghp-import==2.1.0
- htmlmin==0.1.12
- idna==3.4
- jinja2==3.1.2
- jsmin==3.0.1
- markdown==3.3.7
- markupsafe==2.1.2
- mergedeep==1.3.4
- mkdocs==1.4.2
- mkdocs-material==9.0.10
- mkdocs-material-extensions==1.1.1
- mkdocs-minify-plugin==0.6.2
- mkdocs-redirects==1.2.0
- packaging==23.0
- pygments==2.14.0
- pymdown-extensions==9.9.2
- python-dateutil==2.8.2
- pyyaml==6.0
- pyyaml-env-tag==0.1
- regex==2022.10.31
- requests==2.28.2
- six==1.16.0
- urllib3==1.26.14
- watchdog==2.2.1
- mkdocs-gen-files
- markdown-exec[ansi]
- paramiko
102 changes: 102 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
site_name: Software Training
site_description: Software training course
site_author: DIPC CC Staff

# Copyright
copyright: Copyright © 2023 DIPC

site_url: https://dipc-cc.github.io/training-software

# Navigation
nav:
- Introduction:
- index.md

# Extras
extra:
social:
- icon: fontawesome/brands/twitter
link: https://twitter.com/DIPCehu
- icon: fontawesome/brands/linkedin
link: https://www.linkedin.com/company/donostia-international-physics-center-dipc


# Configuration
theme:
name: material
features:
- navigation.indexes
logo: images/dipc-logo.png
favicon: images/favicon.ico
language: en
font:
text: Roboto
code: Roboto Mono
palette:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: custom-dark
toggle:
icon: material/brightness-4
name: Switch to light mode

# Extra CSS styles
extra_css:
- stylesheets/extra.css
- stylesheets/dark-palette.css


# Extensions
markdown_extensions:
- meta
- attr_list
- footnotes
- admonition
- codehilite:
guess_lang: false
- toc:
permalink: true
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.critic
- pymdownx.emoji:
emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.mark
- pymdownx.smartsymbols:
fractions: false
- pymdownx.superfences
- pymdownx.details
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
- pymdownx.snippets
- pymdownx.superfences:
custom_fences:
- name: python
class: python
validator: !!python/name:markdown_exec.validator
format: !!python/name:markdown_exec.formatter

extra_javascript:
- javascripts/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

# Plugins
plugins:
- search
- minify:
minify_html: true
- markdown-exec

37 changes: 37 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
charset-normalizer==3.0.1
click==8.1.3
colorama==0.4.6
csscompressor==0.9.5
easybuild==4.6.2
easybuild-easyblocks==4.6.2
easybuild-easyconfigs==4.6.2
easybuild-framework==4.6.2
ghp-import==2.1.0
htmlmin==0.1.12
idna==3.4
Jinja2==3.1.2
jsmin==3.0.1
Markdown==3.3.7
MarkupSafe==2.1.2
mergedeep==1.3.4
mkdocs==1.4.2
mkdocs-material==9.0.10
mkdocs-material-extensions==1.1.1
mkdocs-minify-plugin==0.6.2
mkdocs-redirects==1.2.0
packaging==23.0
Pygments==2.14.0
pymdown-extensions==9.9.2
python-dateutil==2.8.2
PyYAML==6.0
pyyaml_env_tag==0.1
regex==2022.10.31
requests==2.28.2
six==1.16.0
style==1.1.0
update==0.0.1
urllib3==1.26.14
watchdog==2.2.1
mkdocs-gen-files
markdown-exec[ansi]
paramiko

0 comments on commit 11e0e7f

Please sign in to comment.