File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6363
6464 steps :
6565 - name : Checkout repository
66- uses : actions/checkout@v1
66+ uses : actions/checkout@v4
6767 with :
68- fetch-depth : 1
68+ ref : gh-pages
6969
7070 - name : Download artifact
7171 uses : actions/download-artifact@v3
7979
8080 - name : Deploy to gh-pages branch
8181 run : |
82- git config user.name "${GITHUB_ACTOR}"
83- git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
84- git checkout --orphan gh-pages
85- git reset --hard
86- mv site/* .
87- rm -rf site
88- git clean -fdx
89- remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
90- git add .
91- git commit -m "Deploy documentation to gh-pages"
92- git push --force $remote_repo gh-pages
82+ # git config user.name "${GITHUB_ACTOR}"
83+ # git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
84+
85+ tree
Original file line number Diff line number Diff line change 33.build
44.env
55site.zip
6+ deploy
67
78# temporary
89rodi
Original file line number Diff line number Diff line change 1+ # For the maintainer having the necessary rights to publish from the local
2+ # dev environment...
3+
4+ if [[ ! -d " site" ]]; then
5+ echo -e " \033[31mError: 'site' folder does not exist. Aborting.\033[0m"
6+ exit 1
7+ fi
8+
9+ read -p " Are you sure you want to proceed? (y/n): " confirmation
10+
11+ if [[ " $confirmation " =~ ^[Yy]$ ]]; then
12+ echo " Deploying..."
13+
14+ rm -rf deploy
15+ mkdir deploy
16+ cd deploy
17+
18+ git clone -b gh-pages git@github.com:Neoteroi/neoteroi.github.io.git copy
19+
20+ cp copy/CNAME ../site/
21+ cp copy/README.md ../site/
22+
23+ rm -rf copy/*
24+ cp -r ../site/* copy/
25+
26+ cd copy/
27+ git add .
28+ git commit -m " Deploy documentation on $( date -u ' +%Y-%m-%d %H:%M:%S UTC' ) "
29+ git push origin gh-pages --force
30+
31+ echo " Published to gh-pages"
32+ else
33+ echo " Operation canceled."
34+ exit 1
35+ fi
You can’t perform that action at this time.
0 commit comments