Skip to content

Commit

Permalink
Switch to GH Action deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
tomncooper committed Oct 12, 2024
1 parent 772a4d3 commit 812c140
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
name: Build and Push
name: Build Site Source
steps:
- name: Git checkout
uses: actions/checkout@v4
Expand All @@ -31,14 +31,24 @@ jobs:

- name: Build the site
run: python kipper/main.py output standalone dev/kip_mentions.csv site_files/index.html

- name: Push to site branch
uses: seanmiddleditch/gha-publish-to-git@master

- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
branch: gh-pages
github_token: '${{ secrets.GITHUB_TOKEN }}'
github_pat: '${{ secrets.GH_PAT }}'
source_folder: site_files
if: success() && github.event == 'push'
path: site_files

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

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
dev/*html
*csv
*.json

site_files/*

0 comments on commit 812c140

Please sign in to comment.