File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed
Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ # Taken from the Lux.jl deployment strategy
2+ # This helps us avoid Vitepress hydration issues when viewing a webpage from a symlink
3+ name : Deploy GitHub Pages
4+
5+ on :
6+ # Runs on pushes targeting the default branch
7+ push :
8+ branches :
9+ - gh-pages
10+
11+ # Allows you to run this workflow manually from the Actions tab
12+ workflow_dispatch :
13+
14+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+ permissions :
16+ contents : read
17+ pages : write
18+ id-token : write
19+
20+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22+ concurrency :
23+ group : " pages"
24+ cancel-in-progress : false
25+
26+ jobs :
27+ # Build job
28+ build :
29+ runs-on : ubuntu-latest
30+ steps :
31+ - name : Checkout
32+ uses : actions/checkout@v4
33+ with :
34+ ref : " gh-pages"
35+ fetch-depth : 0 # Not needed if lastUpdated is not enabled
36+ - name : Setup Pages
37+ uses : actions/configure-pages@v5
38+ - name : Fix Symlinks for Vitepress
39+ run : |
40+ find -type l -exec bash -c 'dir="$0"; newlnk=${dir:2}; lnk="$(readlink -m "$0")"; orglnk=$(basename $lnk); echo "$newlnk <--> $orglnk"; rm "$0"; cp -r $lnk "$0"; cd "$0"; grep "$orglnk" . -lr | xargs sed -i "s/$orglnk/$newlnk/g"; cd ..' {} \;
41+ ls -al;
42+ - name : Build with Jekyll
43+ uses : actions/jekyll-build-pages@v1
44+ with :
45+ source : ./
46+ destination : ./_site
47+ - name : Upload artifact
48+ uses : actions/upload-pages-artifact@v3
49+
50+ # Deployment job
51+ deploy :
52+ environment :
53+ name : github-pages
54+ url : ${{ steps.deployment.outputs.page_url }}
55+ runs-on : ubuntu-latest
56+ needs : build
57+ steps :
58+ - name : Deploy to GitHub Pages
59+ id : deployment
60+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments