Skip to content

Publish to gh-pages #26

Publish to gh-pages

Publish to gh-pages #26

Workflow file for this run

name: Publish to gh-pages
on:
push:
branches: [ main ]
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
env:
python-version: 3.7
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ env.python-version }}
- name: Install apt dependencies
run: |
sudo apt-get update && \
sudo apt-get install -y --no-install-recommends \
dblatex \
docbook-xml \
docbook-xsl \
dvipng \
fop \
graphviz \
highlight \
imagemagick \
libxml2-utils \
lilypond \
source-highlight \
texlive-latex-base \
xsltproc \
wget
- name: Install dependencies
run: pip install asciidoc
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- name: Build gh-pages
run: bash build_website.sh
- name: Fix permissions
run: sudo chown -R $(id -u):$(id -g) gh-pages
- name: Commit files
run: |
cd gh-pages
git config --local user.email "[email protected]"
git config --local user.name "MasterOdin"
git add . || :
git commit -s -m "deploy: ${{ steps.slug.outputs.sha8 }}" -a || :
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: gh-pages
branch: gh-pages