ci: switch to Github Actions
This commit is contained in:
parent
fe134dff26
commit
5c1cd30134
38
.github/workflows/deploy.yml
vendored
Normal file
38
.github/workflows/deploy.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
name: Vuepress Deployment
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
pages:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14.x'
|
||||
- name: Cache NPM dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.OS }}-npm-cache
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-npm-cache
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
cd vuepress
|
||||
npm install
|
||||
- name: Build
|
||||
run: |
|
||||
cd vuepress
|
||||
npm run build
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
deploy_key: ${{ secrets.ACCESS_TOKEN }}
|
||||
publish_dir: vuepress/docs/.vuepress/dist
|
||||
publish_branch: gh-pages
|
19
.travis.yml
19
.travis.yml
|
@ -1,19 +0,0 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- lts/*
|
||||
branches:
|
||||
only:
|
||||
- main
|
||||
install:
|
||||
- cd vuepress
|
||||
- yarn install
|
||||
script:
|
||||
- yarn build
|
||||
deploy:
|
||||
provider: pages
|
||||
skip_cleanup: true
|
||||
local_dir: vuepress/docs/.vuepress/dist
|
||||
github_token: $CI_DEPLOY_TOKEN
|
||||
keep_history: true
|
||||
on:
|
||||
branch: main
|
Loading…
Reference in New Issue
Block a user