Skip to content

Merge pull request #167 from johnlettman/dependabot/npm_and_yarn/ts-j… #162

Merge pull request #167 from johnlettman/dependabot/npm_and_yarn/ts-j…

Merge pull request #167 from johnlettman/dependabot/npm_and_yarn/ts-j… #162

Workflow file for this run

name: GitHub Pages
on:
push:
branches:
- main
tags:
- 'v*.*.*'
jobs:
pages:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Generate documentation
run: yarn docs
- 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: ./docs
tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
tag_message: 'Deployment ${{ github.ref_name }}'