FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ipython.github.com/.github/workflows/deploy.yml at main · ipython/ipython.github.com · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
ipython
/
ipython.github.com
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
16
Star
11
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ipython.github.com
/
.github
/
workflows
/
deploy.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
84 lines (74 loc) · 2.79 KB
Breadcrumbs
ipython.github.com
/
.github
/
workflows
/
deploy.yml
Copy path
File metadata and controls
84 lines (74 loc) · 2.79 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
78
79
80
81
82
83
84
name
:
Deploy to GitHub Pages
on
:
#
Trigger the workflow every time you push to the `main` branch
push
:
branches
:
[ main ]
#
Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch
:
#
Allow this job to clone the repo and create a page deployment
permissions
:
contents
:
read
pages
:
write
id-token
:
write
jobs
:
build
:
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout your repository using git
uses
:
actions/checkout@v4
-
name
:
Install Node.js
uses
:
actions/setup-node@v4
with
:
node-version
:
'
20
'
cache
:
'
npm
'
-
name
:
Install dependencies
run
:
npm ci
-
name
:
Determine base path
id
:
base_path
run
:
|
# If BASE_PATH secret is set, use it
# Otherwise, if repo name matches owner (username.github.io), use root
# Otherwise, use /repo-name
if [ -n "${{ secrets.BASE_PATH }}" ]; then
echo "base_path=${{ secrets.BASE_PATH }}" >> $GITHUB_OUTPUT
elif [ "${{ github.repository }}" == "${{ github.repository_owner }}/${{ github.repository_owner }}.github.io" ]; then
echo "base_path=" >> $GITHUB_OUTPUT
else
echo "base_path=/${{ github.event.repository.name }}" >> $GITHUB_OUTPUT
fi
-
name
:
Build Astro site
run
:
npm run build
env
:
BASE_PATH
:
${{ steps.base_path.outputs.base_path }}
GITHUB_REPOSITORY_OWNER
:
${{ github.repository_owner }}
#
If you have other environment variables, set them here
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
-
name
:
Copy build-time JSON files to dist
run
:
|
# Copy JSON files from public/ to dist/ (they're written during build but after public/ is copied)
if [ -f "public/build-data-pr.json" ]; then
cp public/build-data-pr.json dist/build-data-pr.json
echo "✓ Copied build-data-pr.json to dist/"
fi
if [ -f "public/build-data-pypi.json" ]; then
cp public/build-data-pypi.json dist/build-data-pypi.json
echo "✓ Copied build-data-pypi.json to dist/"
fi
if [ -f "public/build-data-contributors.json" ]; then
cp public/build-data-contributors.json dist/build-data-contributors.json
echo "✓ Copied build-data-contributors.json to dist/"
fi
-
name
:
Upload artifact
uses
:
actions/upload-pages-artifact@v3
with
:
path
:
./dist
deploy
:
needs
:
build
runs-on
:
ubuntu-latest
environment
:
name
:
github-pages
url
:
${{ steps.deployment.outputs.page_url }}
steps
:
-
name
:
Deploy to GitHub Pages
id
:
deployment
uses
:
actions/deploy-pages@v4
Back
|
FazBrowse Home
|
New Git URL