Master, not main #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate web page | |
on: | |
push: | |
branches: 'master' | |
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 | |