generated from UBICenter/analysis-template
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1.54 KB
/
deploy_website.yml
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
name: Submit website PR
on: [push]
jobs:
build:
if: github.repository == 'ubicenter/analysis-template'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: reponame
environment-file: environment.yml
python-version: 3.9
auto-activate-base: false
- name: Build
run: |
git config --global user.name "ubicenter[bot]"
git config --global user.email "[email protected]"
cd ..
git clone https://github.com/ubicenter/ubicenter.org
cd ubicenter.org
git remote add dest https://ubicenter-post-bot:[email protected]/ubicenter-post-bot/ubicenter.org
git remote add upstream https://ubicenter-post-bot:[email protected]/ubicenter/ubicenter.org
git checkout -b ${POST_NAME}
cd ..
python ./ubicenter.org/post_from_notebook.py analysis-template/website/post.ipynb analysis-template/website/metadata.yml --output-md ubicenter.org/_posts/${POST_NAME}.md --output-folder ubicenter.org/assets/markdown_assets/${POST_NAME}/
cd ubicenter.org
git add .
git commit -m "Add new post"
git push dest ${POST_NAME} --force
env:
UBICENTER_POST_BOT_TOKEN: ${{secrets.UBICENTER_POST_BOT_TOKEN}}
POST_NAME: analysis-template