Skip to content

Use ghp-import instead of nelsonjchen/gh-pages-action. #136

Use ghp-import instead of nelsonjchen/gh-pages-action.

Use ghp-import instead of nelsonjchen/gh-pages-action. #136

Workflow file for this run

name: Build Website
on:
push:
branches: master
pull_request:
branches: master
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pelican pyyaml beautifulsoup4 ghp-import
git clone --depth=1 --single-branch --branch mechmotum https://github.com/mechmotum/pelican-alchemy.git
git clone --depth=1 https://github.com/getpelican/pelican-plugins.git
- name: Build the website
run: |
pelican -D -v --fatal errors -s publishconf.py -o output
- name: Deploy the website
if: ${{ github.event_name == 'push' }}
run: |
git fetch origin
git checkout master
git pull origin master
git config --global user.name "Github Actions"
git config --global user.email [email protected]
git remote add deploy "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/bmdconf/bmd2023.git"
ghp-import -r deploy -b gh-pages -m "Updated via Github Actions [skip ci]" -p output