Skip to content

Github Pages Nightly #349

Github Pages Nightly

Github Pages Nightly #349

Workflow file for this run

name: github pages
env:
NODE_VERSION: "14.x"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{env.NODE_VERSION}}
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run gh-build
- name: Prepare tag
id: prepare_tag
if: startsWith(github.ref, 'refs/tags/')
run: |
TAG_NAME="${GITHUB_REF##refs/tags/}"
echo "::set-output name=tag_name::${TAG_NAME}"
echo "::set-output name=deploy_tag_name::deploy-${TAG_NAME}"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./imageviewer
tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
tag_message: "Deployment to gh-pages to test new viewer ${{ steps.prepare_tag.outputs.tag_name }}"