-
-
Notifications
You must be signed in to change notification settings - Fork 5
65 lines (55 loc) · 1.53 KB
/
release.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
name: Release-Build
on:
push:
branches: [ v2 ]
workflow_dispatch:
inputs:
version:
description: 'رقم الاصدار'
required: true
default: 'الاخير'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: '0'
# setup python
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10.*
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -U pip wheel
python -m pip install -r requirements.txt
git submodule update --init --recursive
pip show mkdocs-material
- name: mkdocs build
run: mkdocs build --clean --verbose -d site
- name: Include _headers file
run: cp _headers site/_headers
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: site
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Cache pip files
uses: actions/[email protected]
env:
cache-name: pip-reg
with:
path: $HOME/.cache/pip
key: pip-reg
- name: Cache Mkdocs files
uses: actions/cache@v3
with:
key: ${{ github.ref }}
path: .cache