mirror of
https://github.com/hacks-guide/Guide_Vita.git
synced 2024-11-23 09:39:44 +00:00
fixed gh actions
This commit is contained in:
parent
f02f3ebb03
commit
e8f2c25436
7
.github/dependabot.yml
vendored
7
.github/dependabot.yml
vendored
@ -1,7 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
48
.github/workflows/publish.yml
vendored
48
.github/workflows/publish.yml
vendored
@ -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 }}
|
Loading…
Reference in New Issue
Block a user