tachiyomi-website/.github/workflows/push.yml
arkon 8330219459 Revert to Node 14
node-sass 4 doesn't handle Node 16. Could maybe update all of that stuff, but vuepress still seems to rely on Webpack 4?
2021-07-31 11:09:18 -04:00

51 lines
1.2 KiB
YAML

name: Build and deploy website
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Setup NPM 7
run: npm install -g npm@7
- name: Check cache
uses: actions/cache@v2
id: npm-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm install
- name: Build website
run: npm run build
- name: Add .nojekyll
run: touch ./public/.nojekyll
- name: Deploy website
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./public
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
commit_message: ${{ github.event.head_commit.message }}