Skip to content

Generate web page #5885

Generate web page

Generate web page #5885

Workflow file for this run

name: Generate web page
on:
push:
branches: 'master'
schedule:
- cron: '7 */6 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container: perl:latest
steps:
- name: Install snapd
run: |
apt-get -y update
apt-get -y install gh
- name: Perl version
run: perl -v
- name: Checkout
uses: actions/checkout@v4
- name: Install cpanm
run: apt-get update && apt-get install -y cpanminus
- name: Install modules
run: |
cpanm --installdeps --notest .
- name: Create pages
env:
PERL5LIB: lib
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p docs
perl bin/dashboard
- name: Commit new page
if: github.repository == 'PerlToolsTeam/dashboard'
run: |
git config --global --add safe.directory /__w/dashboard/dashboard
GIT_STATUS=$(git status --porcelain)
echo $GIT_STATUS
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
if [ "$GIT_STATUS" != "" ]; then git commit -m "Automated Web page generation"; fi
if [ "$GIT_STATUS" != "" ]; then git push; fi
- name: Update pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4