Skip to content

Testing the GitHub Pages publication #1348

Testing the GitHub Pages publication

Testing the GitHub Pages publication #1348

Workflow file for this run

name: Testing the GitHub Pages publication
on:
push:
schedule:
- cron: '50 12 * * *'
repository_dispatch:
types: run_workflow
jobs:
jekyll:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run script
env:
GSPREAD_TYPE: ${{ secrets.GSPREAD_TYPE}}
GSPREAD_PROJECT_ID: ${{ secrets.GSPREAD_PROJECT_ID}}
GSPREAD_PRIVATE_KEY_ID: ${{ secrets.GSPREAD_PRIVATE_KEY_ID}}
GSPREAD_PRIVATE_KEY: ${{ secrets.GSPREAD_PRIVATE_KEY}}
GSPREAD_CLIENT_EMAIL: ${{ secrets.GSPREAD_CLIENT_EMAIL}}
GSPREAD_CLIENT_ID: ${{ secrets.GSPREAD_CLIENT_ID}}
GSPREAD_AUTH_URI: ${{ secrets.GSPREAD_AUTH_URI}}
GSPREAD_TOKEN_URI: ${{ secrets.GSPREAD_TOKEN_URI}}
GSPREAD_AUTH_PROVIDER_X509_CERT_URL: ${{ secrets.GSPREAD_AUTH_PROVIDER_X509_CERT_URL}}
GSPREAD_CLIENT_X509_CERT_URL: ${{ secrets.GSPREAD_CLIENT_X509_CERT_URL}}
run: python get_gsheets_posts.py
- name: Commit posts and images
run: |
git config --global user.name 'Bot'
git config --global user.email '[email protected]'
git add _posts/
git add assets/img/
if [[ "$(git status --porcelain)" != "" ]]; then
git commit -am "Automated additional posts and images"
git push -f origin HEAD:main
fi
# Specify the target branch (optional)
- uses: helaili/jekyll-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
jekyll_src: ''
target_branch: 'gh-pages'