Merge pull request #112 from ga4gh/dependabot/github_actions/dot-gith… #4
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: Publish Main | |
on: | |
# Triggers the workflow on push to the main branch | |
push: | |
branches: [ main, master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
replace-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v2 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }} | |
restore-keys: | | |
${{ runner.os }}-gems- | |
- name: Set Jekyll baseurl to Publish Folder | |
uses: mikefarah/yq@master | |
env: | |
PUBLISH_BASEURL: data-security | |
with: | |
cmd: yq eval -i '.baseurl = strenv(PUBLISH_BASEURL)' '_config.yml' | |
# NOTE: this build step is duplicated between publish-drafts and publish-main - please keep in sync | |
- name: Build Jekyll Site | |
uses: helaili/jekyll-action@master | |
env: | |
PLANTUML_VERSION: "1.2023.6" | |
with: | |
# this is dodgy.. the jekyll action wants to build things outside our workspace so setting it to | |
# this brings it back into the workspace where files will be kept for the deploy | |
target_path: ../workspace/build | |
build_only: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
pre_build_commands: apk add --no-cache graphviz wget ca-certificates ttf-dejavu fontconfig openjdk11 && wget http://downloads.sourceforge.net/project/plantuml/$PLANTUML_VERSION/plantuml.$PLANTUML_VERSION.jar -O /usr/bin/plantuml.jar && echo '#!/bin/sh' > /usr/bin/plantuml && echo 'java -jar /usr/bin/plantuml.jar $*' >> /usr/bin/plantuml && chmod a+rx /usr/bin/plantuml | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
# note that because this a publish of the main branch - it completely replaces the content of the gh-pages | |
# (see publish-drafts for how drafts are published in a cumulative mode) | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: build |