Skip to content

Merge branch 'master' of github.com:davorg/twittelection #10

Merge branch 'master' of github.com:davorg/twittelection

Merge branch 'master' of github.com:davorg/twittelection #10

Workflow file for this run

name: Generate web page
on:
push:
branches: 'master'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install cpanminus
run: sudo apt update && sudo apt install cpanminus
- name: Install modules
run: |
cpanm --sudo --installdeps --notest .
- name: Create pages
env:
PERL5LIB: lib
run: |
bin/build
- name: Commit new page
if: github.repository == 'davorg/twittelection'
run: |
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 docs/
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