Skip to content

Commit 6cc448f

Browse files
committed
Add a web site builder workflow
1 parent a22a8fd commit 6cc448f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/buildsite.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Generate web site
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
14+
- name: Install cpanm
15+
run: |
16+
sudo apt-get update -y
17+
sudo apt-get install -y cpanminus
18+
- name: Install modules
19+
run: |
20+
sudo cpanm --installdeps --notest .
21+
sudo cpanm --notest App::CPANModuleSite
22+
- name: Create pages
23+
run: |
24+
mkdir -p docs
25+
mksite
26+
- name: Commit new page
27+
run: |
28+
GIT_STATUS=$(git status --porcelain)
29+
echo $GIT_STATUS
30+
git config --global user.name 'Dave Cross'
31+
git config --global user.email 'dave@perlschool.com'
32+
git add docs/
33+
if [ "$GIT_STATUS" != "" ]; then git commit -m "Web site generation"; fi
34+
if [ "$GIT_STATUS" != "" ]; then git push; fi

0 commit comments

Comments
 (0)