K Framework Release 3917/merge #1039
Workflow file for this run
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: 'Release' | |
run-name: K Framework Release ${{ github.ref_name }} | |
on: | |
pull_request: | |
types: [opened, edited, reopened, synchronize] | |
branches: | |
- 'develop' | |
concurrency: | |
group: ${{ github.workflow }} | |
jobs: | |
gh-pages: | |
name: 'GitHub Pages deployment' | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 30 | |
steps: | |
- name: 'Install pandoc/texlive/calibre' | |
run: | | |
sudo apt update --yes | |
sudo apt install --yes wget texlive-xetex libegl1 libopengl0 | |
sudo wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin version=6.29.0 | |
sudo wget https://github.com/jgm/pandoc/releases/download/2.18/pandoc-2.18-1-amd64.deb -O /tmp/pandoc.deb | |
sudo dpkg -i /tmp/pandoc.deb | |
- name: 'Checkout code and set up web build' | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
path: gh-pages | |
token: ${{ secrets.JENKINS_GITHUB_PAT }} | |
fetch-depth: 0 | |
- name: 'Checkout PL Tutorial code' | |
uses: actions/checkout@v3 | |
with: | |
repository: runtimeverification/pl-tutorial | |
path: gh-pages/k-distribution/pl-tutorial | |
token: ${{ secrets.JENKINS_GITHUB_PAT }} | |
- working-directory: gh-pages | |
run: | | |
git config --global user.name rv-jenkins | |
git config --global user.email [email protected] | |
git checkout --orphan gh-pages origin/master | |
- name: 'Build webpage' | |
working-directory: gh-pages | |
run: | | |
export PATH="$PATH":/opt/calibre | |
cd web | |
npm install | |
npm run build | |
npm run build-book | |
npm run build-sitemap | |
cd - | |
mv web/public_content ./ | |
rm -rf $(find . -maxdepth 1 -not -name public_content -a -not -name .git -a -not -path . -a -not -path .. -a -not -name CNAME) | |
mv public_content/* ./ | |
rm -rf public_content |