-
Notifications
You must be signed in to change notification settings - Fork 14
70 lines (57 loc) · 2.24 KB
/
Copy pathdeposit.yml
File metadata and controls
70 lines (57 loc) · 2.24 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Deposit new posts on Zenodo
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deposit:
runs-on: ubuntu-20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
python3-pip libcurl4-openssl-dev xfonts-base xfonts-75dpi xvfb qt5-default xkb-data x11-xkb-utils \
ruby-full build-essential zlib1g-dev
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb
pip3 install --user --upgrade pip
pip3 install --user requests
pip3 install --user coloredlogs
- name: Cache gems
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Install Jekyll and gems
run:
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
sudo gem update --system|
sudo gem install sass-embedded
sudo gem install jekyll bundler
bundle config path vendor/bundle
bundle install
- name: Build page
run: bundle exec jekyll build
- name: Capture page as PDF
run: |
export DISPLAY=localhost:1.0
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
xvfb-run make capture_pdf
pkill -f jekyll;
- name: Create archive of current repo
run: make capture_zip
- name: Deposit on Zenodo
env:
ZENODO_TOKEN: ${{ secrets.ZENODO_TOKEN }}
run: |
python3 zenodo_release.py;