Skip to content

chore(deploy): deploy to tiddlyhost #102

chore(deploy): deploy to tiddlyhost

chore(deploy): deploy to tiddlyhost #102

Workflow file for this run

name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Clone git submodule
run: git submodule update --init
- name: Install dependencies
run: npm ci
- name: Build library and static website
run: npm run publish
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
- name: Deploy to tiddlyhost
env:
THOST_EMAIL: ${{ secrets.THOST_EMAIL }}
THOST_TOKEN: ${{ secrets.TH_PASSWORD }}
run: for file in $(find dist/empty -type f -regex ".*\.html"); do site=${file%.html}; site=${site#dist/empty/}; if [ "$site" == "index" ]; then site="tidme"; else site="tidme-${site,,}"; fi; ./bin/thost-uploader $site $file $THOST_EMAIL $TH_PASSWORD; done
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release