-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (73 loc) · 2.42 KB
/
deploy.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
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
71
72
73
74
75
76
77
name: deploy
on:
push:
branches:
- master
schedule:
# UTC Time, AT 03:00 on Sunday.
# Looks suitable for Xradar schedule
- cron: "0 3 * * 0"
jobs:
deploy-jekyll-build:
runs-on: ubuntu-latest
env:
JEKYLL_ENV: production
strategy:
matrix:
python-version: ['3.10']
ruby-version: ['2.7']
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: '0'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install pipenv
run: |
python -m pip install pipenv
# no need to install bundle with bundler-cache: true
# - name: Install Ruby dependencies
# run: |
# bundle update
# See: https://github.com/actions/cache/blob/main/examples.md#python---pipenv
# - name: Cache Pipfile files if possible
# uses: actions/cache@v2.1.4
# with:
# path: ~/.local/share/virtualenvs
# key: ${{ runner.os }}-pipenv-${{ hashFiles('Pipfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-pipenv-${{ hashFiles('Pipfile.lock') }}
- name: Install Python dependencies
run: |
pipenv update
# --lsi may fail in some cases
# see: https://github.com/jekyll/classifier-reborn/issues/64
- name: Build the site
run: |
bundle exec jekyll build --config _config.yml,_config-deploy.yml --lsi ||
bundle exec jekyll build --config _config.yml,_config-deploy.yml
- name: Create build-info
run: |
pipenv run python utils.py build-info
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
dry-run: false
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: _site # The folder the action should deploy.
clean: true # Automatically remove deleted files from the deploy branch
single-commit: true # Like push force, keep only the last commit
git-config-name: #use username that pushes to master
git-config-email: <> #asynxdev@users.noreply.github.com