Skip to content

Commit

Permalink
Add build workflow and configure Dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Apr 19, 2024
1 parent f10c358 commit 4b84cd1
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,10 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,53 @@
name: Generate web page

on:
push:
branches: 'main'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install modules
run: |
cpanm --installdeps --notest .
- name: Create pages
run: |
perl 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@v1
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@v1

0 comments on commit 4b84cd1

Please sign in to comment.