Add dependabot #18
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: Render WSCL | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: install-platform-dependencies | |
run: | | |
DEBIAN_FRONTEND=noninteractive sudo apt-get update -y \ | |
&& DEBIAN_FRONTEND=noninteractive sudo apt-get install -y \ | |
curl libzstd1 | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# - name: fetch-converter-binary | |
# run: | | |
# DOWNLOAD_URL=$(curl -s 'https://api.github.com/repos/scymtym/dpans-conversion/actions/artifacts?per_page=9' \ | |
# | jq '[.artifacts[] | {name : .name, archive_download_url : .archive_download_url}]' \ | |
# | jq -r '.[] | select (.name == "dpans-converter") | .archive_download_url') | |
# echo "Downloading dpans-converter binary from ${DOWNLOAD_URL}" | |
# curl --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
# "${DOWNLOAD_URL}" > dpans-converter.zip | |
# unzip dpans-converter.zip | |
# chmod +x dpans-converter | |
- name: fetch-converter-binary | |
run: | | |
curl -L https://github.com/scymtym/dpans-conversion/releases/download/test-release/dpans-converter-x86-64-linux \ | |
> dpans-converter | |
chmod +x dpans-converter | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: render-html | |
run: | | |
./dpans-converter "$(pwd)/" "${{ steps.pages.outputs.base_path }}/" --format html \ | |
--issue-annotations true \ | |
--reviewer-annotations true \ | |
--editor-annotations true \ | |
--removable-annotations true \ | |
--with-sidebar true | |
- name: add-index-html | |
run: | | |
echo -e '<html lang="en">\n' > /tmp/output/index.html | |
echo -e '<head>\n' >> /tmp/output/index.html | |
echo -e '<meta charset="utf-8">\n' >> /tmp/output/index.html | |
echo -e '<meta http-equiv="refresh" content="0;url=chap-0.xhtml"/>\n' >> /tmp/output/index.html | |
echo -e '<link rel="canonical" href="https://s-expressionists.github.io/wscl/chap-0.xhtml"/>\n' >> "${{ steps.pages.outputs.base_path }}/index.html" | |
echo -e '</head>\n' >> /tmp/output/index.html | |
echo -e '</html>\n' >> /tmp/output/index.html | |
- name: Upload artifact | |
# Automatically uploads an artifact from the './_site' directory by default | |
uses: actions/upload-pages-artifact@v3 | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
- name: deploy-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: /tmp/output | |
destination_dir: ./docs |