fixed gh actions

This commit is contained in:
emiyl 2021-11-03 15:39:34 +00:00
parent f02f3ebb03
commit e8f2c25436
2 changed files with 28 additions and 27 deletions

View File

@ -1,7 +0,0 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10

View File

@ -1,39 +1,47 @@
name: Deploy site
name: docs
on:
# trigger deployment on every push to main branch
push:
branches: [ master ]
paths:
- docs/**
- .github/workflows/publish.yml
- package.json
branches: [ main, master ]
# trigger deployment manually
workflow_dispatch:
jobs:
doc-deploy:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
# fetch all commits to get last updated time or other git log info
fetch-depth: 0
submodules: recursive
- uses: actions/setup-node@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '13'
# choose node.js version to use
node-version: '14'
# install dependencies if the cache did not hit
- name: Install dependencies
run: npm install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Run VuePress
# Build the site using VuePress
run: npm run docs:build
# run build script
- name: Build VuePress site
run: yarn docs:build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
# please check out the docs of the workflow for more details
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/.vuepress/dist # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch
# deploy to gh-pages branch
target_branch: gh-pages
# deploy the default output dir of VuePress
build_dir: docs/.vuepress/dist
env:
# @see https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}