File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy
2+ on :
3+ push :
4+ branches :
5+ - main
6+
7+ jobs :
8+ deploy :
9+ runs-on : ubuntu-latest
10+ permissions :
11+ contents : write # To push a branch
12+ pull-requests : write # To create a PR from that branch
13+ steps :
14+ - uses : actions/checkout@v3
15+ with :
16+ fetch-depth : 0
17+ submodules : recursive
18+ - name : Install pelican
19+ run : |
20+ python3 -m venv venv
21+ ./venv/bin/pip install -U pip
22+ ./venv/bin/pip install pelican
23+ - name : Deploy GitHub Pages
24+ run : |
25+ # This assumes your book is in the root of your repository.
26+ # Just add a `cd` here if you need to change to another directory.
27+ ./venv/bin/pelican
28+ git worktree add gh-pages
29+ git config user.name "Deploy from CI"
30+ git config user.email ""
31+ cd gh-pages
32+ # Delete the ref to avoid keeping history.
33+ git update-ref -d refs/heads/gh-pages
34+ rm -rf *
35+ mv ../output/* .
36+ echo 'bpython-interpreter.org' > CNAME
37+ git add .
38+ git commit -m "Deploy $GITHUB_SHA to gh-pages"
39+ git push --force --set-upstream origin gh-pages
You can’t perform that action at this time.
0 commit comments