File tree Expand file tree Collapse file tree 2 files changed +108
-0
lines changed
Expand file tree Collapse file tree 2 files changed +108
-0
lines changed Original file line number Diff line number Diff line change 1+ # .github/workflows/docs-pages.yml
2+
3+ name : Deploy VitePress Site to Pages
4+
5+ on :
6+ push :
7+ branches : [main]
8+ workflow_dispatch :
9+
10+ permissions :
11+ contents : read
12+ pages : write
13+ id-token : write
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Checkout
20+ uses : actions/checkout@v4
21+ with :
22+ fetch-depth : 0
23+ - name : Setup Node.js
24+ uses : actions/setup-node@v4
25+ with :
26+ node-version : 20
27+ cache : ' npm'
28+ cache-dependency-path : docs/package-lock.json
29+ - name : Install dependencies
30+ working-directory : ./docs
31+ run : npm ci
32+ - name : Build
33+ working-directory : ./docs
34+ run : npm run docs:build
35+ - name : Setup Pages
36+ uses : actions/configure-pages@v5
37+ - name : Upload artifact
38+ uses : actions/upload-pages-artifact@v3
39+ with :
40+ path : docs/.vitepress/dist
41+
42+ deploy :
43+ needs : build
44+ environment :
45+ name : github-pages
46+ url : ${{ steps.deployment.outputs.page_url }}
47+ runs-on : ubuntu-latest
48+ steps :
49+ - name : Deploy to GitHub Pages
50+ id : deployment
51+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1+ name : Publish Python Package
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout source
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Python
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : " 3.10"
24+
25+ - name : Install build tools
26+ run : python -m pip install --upgrade build twine
27+
28+ - name : Build distributions
29+ run : python -m build
30+
31+ - name : Check distributions
32+ run : python -m twine check dist/*
33+
34+ - name : Upload build artifacts
35+ uses : actions/upload-artifact@v4
36+ with :
37+ name : python-package-dists
38+ path : dist/
39+
40+ publish :
41+ needs : build
42+ runs-on : ubuntu-latest
43+ environment :
44+ name : pypi
45+ url : https://pypi.org/p/masfactory
46+ permissions :
47+ id-token : write
48+
49+ steps :
50+ - name : Download build artifacts
51+ uses : actions/download-artifact@v4
52+ with :
53+ name : python-package-dists
54+ path : dist/
55+
56+ - name : Publish to PyPI
57+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments